You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by 4 integration <4i...@gmail.com> on 2008/10/21 16:30:49 UTC

Using Camel in IBM WebSphere Message Broker

Hello,

I am new to Camel and have some questions (yes, it can be stupid questions
;) ).

We are going to build a component (a message flow in WebSphere Message
Broker, WMB) that can route a message to one or more WebSphere MQ queue(s)
by matching some JMS headers towards a set of rules.
The rules and endpoints will be in a database.

So the idea is to use WMB and the normal MQInputNode to get the message and
then use a JavaComputeNode that will match the message (JMS headers) to the
rules and then send the message to the endpoint. For the matching part
(which I think is closest to "Dynamic Recipient List") we want to use Apache
Camel as the engine. Since we have rules in a database, I assume Java DSL to
be the way forward.

- So how should I get started ? :) (any tip is valuable)
- Since I have already got the message, how can I use 
         from("xxxxx")
- How should I best implement Java DSL rules with support for AND, OR,
BETWEEN
- Will it require me to implement a specialized Processor?

Best Regards
Joacim


-- 
View this message in context: http://www.nabble.com/Using-Camel-in-IBM-WebSphere-Message-Broker-tp20091539s22882p20091539.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Using Camel in IBM WebSphere Message Broker

Posted by 4 integration <4i...@gmail.com>.
Hello Claus,

Thanks for the input and I will do some proof of concept and see how far I
can get before putting additional questions.

We have a DB2 database on mainframe that are used for value translation
(cross-reference) and configuration storage. That will be used and from WMB
and an API (with a cache) that uses ODBC to connect to DB.

Actually I read your blog yesterday since I got some google-hits and saw
that you are not so pro-websphere ;) Since I am sitting in a large
enterprise, we have appointed products and many from IBM in the integration
area. However, we are heavily working with EIP in our governance process so
Camel fits quite well.

I will try to get the "Camel feel" to be able to put the detailed questions.

Thanks so far!

Best regards
Joacim


Claus Ibsen wrote:
> 
> Hi
> 
> Disclaimer:
> ===========
> In my experience you should assume until proven otherwise that anything
> does not work out of the box with any IBM WebSphere XXX product. So I will
> create some small "hello world" project at first to make sure WebSphere
> can run the stuff without barfing. 
> 
> However Camel 1.4+ does run on WebSphere AS (plain serer) 6.1 (at least on
> the ones I have tested with). But you must try it for yourself.
> 
> For general documentation
> =========================
> All the wiki documentation is good places to peek:
> http://activemq.apache.org/camel/enterprise-integration-patterns.html
> 
> And this one later:
> http://activemq.apache.org/camel/architecture.html
> 
> And maybe an example or a longer tutorial:
> http://activemq.apache.org/camel/architecture.html
> 
> 
> About your use-case
> ===================
> How do you get the rules from the DB? 
> 
> Since you already have the message then you can send it to the "from"
> using the ProducerTemplate.
> http://activemq.apache.org/camel/walk-through-an-example.html
> 
> Using Java DSL gives you the full power of Java where you can use plain
> java for AND, OR and BETWEEN
> 
> However Camel does have DSL for: choice and filter that can be used.
> You can use a Java BEAN for the predicate (compute true|false) and thus
> you can create this logic in beans that can be hooked into the DSL. But
> you are looking for the message router EIP pattern:
> http://activemq.apache.org/camel/message-router.html
> 
> choice
>    .when().bean("MyBetweenBean")
>     
> 
> About processor: You can use plain POJO in Camel, no need to implement any
> Camel interfaces. But we also have a org.apache.camel.Processor interface
> you can use and it has a process DSL as well. 
> 
> But please try cranking some code together then you get the 'feel for it'
> and then you can ask again.
> 
> 
> Med venlig hilsen
>  
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> 

-- 
View this message in context: http://www.nabble.com/Using-Camel-in-IBM-WebSphere-Message-Broker-tp20091539s22882p20104392.html
Sent from the Camel - Users mailing list archive at Nabble.com.


RE: Using Camel in IBM WebSphere Message Broker

Posted by Claus Ibsen <ci...@silverbullet.dk>.
Hi

Disclaimer:
===========
In my experience you should assume until proven otherwise that anything does not work out of the box with any IBM WebSphere XXX product. So I will create some small "hello world" project at first to make sure WebSphere can run the stuff without barfing. 

However Camel 1.4+ does run on WebSphere AS (plain serer) 6.1 (at least on the ones I have tested with). But you must try it for yourself.

For general documentation
=========================
All the wiki documentation is good places to peek:
http://activemq.apache.org/camel/enterprise-integration-patterns.html

And this one later:
http://activemq.apache.org/camel/architecture.html

And maybe an example or a longer tutorial:
http://activemq.apache.org/camel/architecture.html


About your use-case
===================
How do you get the rules from the DB? 

Since you already have the message then you can send it to the "from" using the ProducerTemplate.
http://activemq.apache.org/camel/walk-through-an-example.html

Using Java DSL gives you the full power of Java where you can use plain java for AND, OR and BETWEEN

However Camel does have DSL for: choice and filter that can be used.
You can use a Java BEAN for the predicate (compute true|false) and thus you can create this logic in beans that can be hooked into the DSL. But you are looking for the message router EIP pattern:
http://activemq.apache.org/camel/message-router.html

choice
   .when().bean("MyBetweenBean")
    

About processor: You can use plain POJO in Camel, no need to implement any Camel interfaces. But we also have a org.apache.camel.Processor interface you can use and it has a process DSL as well. 

But please try cranking some code together then you get the 'feel for it' and then you can ask again.


Med venlig hilsen
 
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk

-----Original Message-----
From: 4 integration [mailto:4integration@gmail.com] 
Sent: 21. oktober 2008 16:31
To: camel-user@activemq.apache.org
Subject: Using Camel in IBM WebSphere Message Broker


Hello,

I am new to Camel and have some questions (yes, it can be stupid questions
;) ).

We are going to build a component (a message flow in WebSphere Message
Broker, WMB) that can route a message to one or more WebSphere MQ queue(s)
by matching some JMS headers towards a set of rules.
The rules and endpoints will be in a database.

So the idea is to use WMB and the normal MQInputNode to get the message and
then use a JavaComputeNode that will match the message (JMS headers) to the
rules and then send the message to the endpoint. For the matching part
(which I think is closest to "Dynamic Recipient List") we want to use Apache
Camel as the engine. Since we have rules in a database, I assume Java DSL to
be the way forward.

- So how should I get started ? :) (any tip is valuable)
- Since I have already got the message, how can I use 
         from("xxxxx")
- How should I best implement Java DSL rules with support for AND, OR,
BETWEEN
- Will it require me to implement a specialized Processor?

Best Regards
Joacim


-- 
View this message in context: http://www.nabble.com/Using-Camel-in-IBM-WebSphere-Message-Broker-tp20091539s22882p20091539.html
Sent from the Camel - Users mailing list archive at Nabble.com.