You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by hayden74 <hd...@gmail.com> on 2015/11/17 23:23:46 UTC

Why using camel routes (via activemq) in Apache karaf?

Hi guys,
My camel routes basically represent business services. I started with 2
routes and now I have over 50. The project is a spring MVC/maven deployed in
a Tomcat server. The routes are accessible via ActiveMQ using JMS.
Everything works fine except when it comes to updating or fixing a bug in
one route which results in a full test and deployment cycle for the entire
project. This is not desirable as many systems are now relying on these
routes/services to get data.

Now I am in the process of splitting these routes into OSGi bundles and
deploy them into Apache karaf container. I have one (big) question regarding
the best practices and hope you guys can help me with:

- Should I still be using JMS (via ActiveMQ) to access routes from external
projects? are there alternative and more efficient way to access OSGi
services from non-OSGi applications? 




--
View this message in context: http://camel.465427.n5.nabble.com/Why-using-camel-routes-via-activemq-in-Apache-karaf-tp5774011.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why using camel routes (via activemq) in Apache karaf?

Posted by Matt Sicker <bo...@gmail.com>.
In that case, I like using the REST DSL.

On 19 November 2015 at 03:22, hayden74 <hd...@gmail.com> wrote:

> Thanks Matt, this is what I have in mind... so basically, OSGi bundle to
> non-OSGi => JMS via ActiveMQ. The next question I guess would be OSGi
> service to non-Java platform, such as AngularJS. I probably should post
> another topic about this.
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Why-using-camel-routes-via-activemq-in-Apache-karaf-tp5774011p5774099.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Why using camel routes (via activemq) in Apache karaf?

Posted by hayden74 <hd...@gmail.com>.
Thanks Matt, this is what I have in mind... so basically, OSGi bundle to
non-OSGi => JMS via ActiveMQ. The next question I guess would be OSGi
service to non-Java platform, such as AngularJS. I probably should post
another topic about this. 




--
View this message in context: http://camel.465427.n5.nabble.com/Why-using-camel-routes-via-activemq-in-Apache-karaf-tp5774011p5774099.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why using camel routes (via activemq) in Apache karaf?

Posted by Matt Sicker <bo...@gmail.com>.
By separating your integration concerns into separate bundles, you can
update each bundle separately without redeploying and restarting all the
Camel routes. Your bundles can speak through JMS (separate machines), or
they can even use the direct-vm endpoint (all in the same OSGi instance,
just separate bundles).

On 17 November 2015 at 21:47, hayden74 <hd...@gmail.com> wrote:

> Thanks for the reply souciance. I am a little bit not clear on what you
> mean
> by "separate integration" though. Can you please elaborate more?
>
> I know that OSGi bundles can communicate inside the OSGi container but
> accessing the OSGi from outside is the part that confuses me.
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Why-using-camel-routes-via-activemq-in-Apache-karaf-tp5774011p5774017.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <bo...@gmail.com>

Re: Why using camel routes (via activemq) in Apache karaf?

Posted by hayden74 <hd...@gmail.com>.
Thanks for the reply souciance. I am a little bit not clear on what you mean
by "separate integration" though. Can you please elaborate more? 

I know that OSGi bundles can communicate inside the OSGi container but
accessing the OSGi from outside is the part that confuses me.



--
View this message in context: http://camel.465427.n5.nabble.com/Why-using-camel-routes-via-activemq-in-Apache-karaf-tp5774011p5774017.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why using camel routes (via activemq) in Apache karaf?

Posted by souciance <so...@gmail.com>.
Hello,

Well the way we have setup our development flow is as follows:

1 integration -->1 Camelcontext--->1-Many routes.

Essentially routes that belong together for the purpose of a single
integration can be in the same context. Otherwise they should be seperated
out.

This way each integration is seen as a bundle that is deployed separately.

You can off course continue using ActiveMQ for communication but it is good
to keep the integrations separated just as you would with normal java
classes. You may not notice the effect with 1-10 integrations but once you
reach 50-100 you defintely will.

Best
Souciance



--
View this message in context: http://camel.465427.n5.nabble.com/Why-using-camel-routes-via-activemq-in-Apache-karaf-tp5774011p5774012.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Why using camel routes (via activemq) in Apache karaf?

Posted by Matt Sicker <bo...@gmail.com>.
JMS is still a great way to do it, but there are other message brokers
(Kafka seems to be a popular one) and event queues available depending on
your needs.

On 17 November 2015 at 16:23, hayden74 <hd...@gmail.com> wrote:

> Hi guys,
> My camel routes basically represent business services. I started with 2
> routes and now I have over 50. The project is a spring MVC/maven deployed
> in
> a Tomcat server. The routes are accessible via ActiveMQ using JMS.
> Everything works fine except when it comes to updating or fixing a bug in
> one route which results in a full test and deployment cycle for the entire
> project. This is not desirable as many systems are now relying on these
> routes/services to get data.
>
> Now I am in the process of splitting these routes into OSGi bundles and
> deploy them into Apache karaf container. I have one (big) question
> regarding
> the best practices and hope you guys can help me with:
>
> - Should I still be using JMS (via ActiveMQ) to access routes from external
> projects? are there alternative and more efficient way to access OSGi
> services from non-OSGi applications?
>
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Why-using-camel-routes-via-activemq-in-Apache-karaf-tp5774011.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Matt Sicker <bo...@gmail.com>