JMS Component configurations

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

JMS Component configurations

dpravin
This post was updated on .
Hello All,

We are in process of implementing hundreds of routes that will use Camel. Many of the routes will use remote instance of AMQ, local AMQ or WMQ to process the messages. Each of the routes will have the same (connection pooling) code/configuration repeated to connect to any one of these resources. Is there any solution that can reduce this boiler plate code/configuration.

Adding some information on our environment,

1) Fuse 6.2.1 server
2) Using blueprint for DSL

Thanks,
Pravin
- Pravin
Reply | Threaded
Open this post in threaded view
|

RE: JMS Component configurations

shuston
Put that info in a bean?

> -----Original Message-----
> From: dpravin [mailto:[hidden email]]
> Sent: Monday, September 12, 2016 9:32 PM
> To: [hidden email]
> Subject: JMS Component configurations
>
> Hello All,
>
> We are in process of implementing hundreds of routes that will use Camel.
> Many of the routes will use remote instance of AMQ, local AMQ or WMQ to
> process the messages. Each of the routes will have the same (connection
> pooling) code/configuration repeated to connect to any one of these
> resources. Is there any solution that can reduce this boiler plate
> code/configuration.
>
> Thanks,
> Pravin
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMS-
> Component-configurations-tp5787499.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
Reply | Threaded
Open this post in threaded view
|

Re: JMS Component configurations

DariusX
In reply to this post by dpravin
Check out this page of the documentation: http://camel.apache.org/configuring-camel.html
Reply | Threaded
Open this post in threaded view
|

Re: JMS Component configurations

Quinn Stevenson
I’ve done this a few different ways, but it depends on your routes and deployment technology.

For example, when I’m deploying to a Karaf/OSGi container, I’ll create RouteBuilders that I can configure with the specifics of the environment, and then use Blueprint to configure the individual routes.  For the JMS case, I’d normally expose the JMS Connection Factory through and OSGi service and then wire it into the RouteBuilder with Blueprint.

HTH

> On Sep 13, 2016, at 7:14 AM, DariusX <[hidden email]> wrote:
>
> Check out this page of the documentation:
> http://camel.apache.org/configuring-camel.html
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/JMS-Component-configurations-tp5787499p5787510.html
> Sent from the Camel - Users mailing list archive at Nabble.com.

Reply | Threaded
Open this post in threaded view
|

Re: JMS Component configurations

dpravin
In reply to this post by DariusX
Thank you all for your responses.

Appreciate if you could elaborate. Any examples will be helpfull.
- Pravin
Reply | Threaded
Open this post in threaded view
|

Re: JMS Component configurations

dpravin
All,

I tried following approach, however not sure if this is the right solution.

I extended a class from JmsComponent. Instantiating this bean in my blueprint file and passing a pid to load the property file at runtime.

Constructing following objects in the custom JmsComponent that are required for connection pooling,
JmsConfiguration, JcaPooledConnectionFactory, ActiveMQXAConnectionFactory and setting the configuration object on JmsComponent. This works fine when deployed on the server. However not able to construct the objects appropriately for unit testing.  

Appreciate any help.
- Pravin