Camel with ActiveMQ

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

Camel with ActiveMQ

anujkhandelwal
Hi,

I have a good understanding of ActiveMQ. I am apache exploring camel to extend the use of ActiveMQ. I was reading the basic articles and websites. Just stuck with some questions:

1. Does camel need ActiveMQ broker to run or it can work without ActiveMQ also ?

2. What are the possible use cases where I can use camel with ActiveMQ ?

3. What is component ?  After reading http://activemq.apache.org/broker-camel-component.html 
 Is it like broker in camel or camel in broker?


Thanks,
Anuj


Reply | Threaded
Open this post in threaded view
|

Re: Camel with ActiveMQ

hekonsek
Hi Anuj,

> 1. Does camel need ActiveMQ broker to run or it can work without ActiveMQ also ?

ActiveMQ is only one among many [1] components supported by Camel. So yes, you can run Camel without AMQ.

> 2. What are the possible use cases where I can use camel with ActiveMQ ?

Well, actually whenever you want to receive/send message to JMS you should consider using Camel :) . JMS usage usually involves using Enterprise Integration Patterns [2]. And whenever you need to use EIP, you should consider using Camel for that purpose.

> 3. What is component ?  
> After reading
> http://activemq.apache.org/broker-camel-component.html 
> Is it like broker in camel or camel in broker?

Component is a factory of the endpoints. And endpoints are used to send/receive messages using various protocols and data sources. In the JMS regards broker is something external for Camel. Camel is a kind of powerful JMS client. :)

Check out these [3][4] two books (written by our fellow committers) if you are looking for good introduction to Camel.

Cheers.

[1] http://camel.apache.org/components.html
[2] http://www.enterpriseintegrationpatterns.com
[3] http://www.amazon.com/Instant-Apache-Camel-Message-Routing/dp/1783283475/ref=sr_1_3?ie=UTF8&qid=1397062364&sr=8-3&keywords=camel+apache
[4] http://www.amazon.com/Camel-Action-Claus-Ibsen/dp/1935182366/ref=sr_1_1?ie=UTF8&qid=1397062364&sr=8-1&keywords=camel+apache
Reply | Threaded
Open this post in threaded view
|

Re: Camel with ActiveMQ

anujkhandelwal
>Well, actually whenever you want to receive/send message to JMS you should consider using Camel :) . JMS >usage usually involves using Enterprise Integration Patterns [2]. And whenever you need to use EIP, you >should consider using Camel for that purpose.

But ActiveMQ alone can send/receive JMS message. What specific camel will do in this case ?  
Reply | Threaded
Open this post in threaded view
|

Re: Camel with ActiveMQ

hekonsek
> But ActiveMQ alone can send/receive JMS message. What specific camel will do
> in this case ?

Provide EIP goodness. Plus easy integration with the other endpoints [1].

Cheers.

[1] http://camel.apache.org/components.html

--
Henryk Konsek
http://henryk-konsek.blogspot.com
Reply | Threaded
Open this post in threaded view
|

Re: Camel with ActiveMQ

chaij
Do people normally run ActiveMQ within Karaf or outside of the container?

If to run it inside of Karaf, what are commands to have AcitveMQ installed and start?
Reply | Threaded
Open this post in threaded view
|

Re: Camel with ActiveMQ

kraythe
We run it standalone. That way you can cluster AMQ servers to increase
fault tolerance and throughput. With the Zookeeper based database of AMQ
5.9.0 this is even more powerful.

*Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
*Author of: Hardcore Java (2003) and Maintainable Java (2012)*
*LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
<http://www.linkedin.com/pub/robert-simmons/40/852/a39>*


On Thu, Apr 10, 2014 at 10:23 PM, chaij <[hidden email]> wrote:

> Do people normally run ActiveMQ within Karaf or outside of the container?
>
> If to run it inside of Karaf, what are commands to have AcitveMQ installed
> and start?
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Camel-with-ActiveMQ-tp5750002p5750088.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>
Reply | Threaded
Open this post in threaded view
|

Re: Camel with ActiveMQ

Jeremy Gooch
We run it inside the container.  As per
http://activemq.apache.org/osgi-integration.html the installation is really
easy.

karaf@root()> feature:repo-add
mvn:org.apache.activemq/activemq-karaf/5.9.0/xml/features
karaf@root()> feature:install activemq-broker


You can see the broker and browse the queues via the webconsole:-

http://localhost:8181/activemqweb/index.jsp

J.


On Fri, Apr 11, 2014 at 4:27 AM, kraythe . <[hidden email]> wrote:

> We run it standalone. That way you can cluster AMQ servers to increase
> fault tolerance and throughput. With the Zookeeper based database of AMQ
> 5.9.0 this is even more powerful.
>
> *Robert Simmons Jr. MSc. - Lead Java Architect @ EA*
> *Author of: Hardcore Java (2003) and Maintainable Java (2012)*
> *LinkedIn: **http://www.linkedin.com/pub/robert-simmons/40/852/a39
> <http://www.linkedin.com/pub/robert-simmons/40/852/a39>*
>
>
> On Thu, Apr 10, 2014 at 10:23 PM, chaij <[hidden email]> wrote:
>
> > Do people normally run ActiveMQ within Karaf or outside of the container?
> >
> > If to run it inside of Karaf, what are commands to have AcitveMQ
> installed
> > and start?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://camel.465427.n5.nabble.com/Camel-with-ActiveMQ-tp5750002p5750088.html
> > Sent from the Camel - Users mailing list archive at Nabble.com.
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Camel with ActiveMQ

hekonsek
In reply to this post by chaij
> Do people normally run ActiveMQ within Karaf or outside of the container?

Usually you would like to put broker as a separated container for many
reasons - scalability, high availability and so forth. Having embedded
broker means also that the systems communicating via that broker are
tightly coupled - you won't be able to enqueue the messages while your
application is down (as the broker will be down at the same time).

My opinionated recommendation is to have a standalone broker by
default and stick to embedded one only if you really got a reason to
do so.

Cheers.

--
Henryk Konsek
http://henryk-konsek.blogspot.com