IAmYourFaja
IAmYourFaja

Reputation: 56914

How JMS Relates to Service Buses

I'm trying to wrap my brain around JMS and have been reading up on some very helpful sources and examples. I'm now trying to see the "big picture" here and put all the theory behind JMS into a practical context where real enterprise technologies are used.

enter image description here

So here we have four elements: (1) JMS - a Java API for MOM, (2) ActiveMQ - one of the many JMS implementations, (3) EIP - an intriguing and mysterious beast I am only beginning to understand, and finally, (4) Apache Camel, an open source implementation of that beast.

I am trying to now relate these components together to see JMS (and, in general, enterprise-class messaging) in action.

I guess the first thing I'm looking for is a simple and concise definition for what EIPs are. They seem to be a whole set of design patterns for how MOMs should behave, but since I'm already fuzzy on the concept of messaging to begin with, this is just a fuzzier definition being added on top of an already-fuzzy understanding of some pretty hardcore concepts.

Even if I don't "get" what EIPs are, I do "get" that frameworks like Camel, Mule and ServiceMix implement them and allow server-side components ("endpoints") to message each other efficiently.

Most important to this question is my understanding of how these four components relate to one another. I think understanding this will help me connect most of the dots; well, the important ones anyway.

So in the diagram above I labeled all 6 possible relationships and refer to them below:

  1. JMS:ActiveMQ - I understand ActiveMQ to be an implementation of JMS, much like Hibernate is an implementation of JPA. Is this correct?
  2. ActiveMQ:Camel - Camel has the ability to push messages to any JMS implementation, such as ActiveMQ. In this case ActiveMQ is a camel endpoint. Correct?
  3. EIP:Camel - Camel is an implementation of EIPs. Understanding what EIPs are in the first place is also important to my understanding of this entire setup.
  4. EIP:JMS - Although there may not be a direct connection between these two, it seems as though messaging is at the core of EIP, and JMS is Java's foundation for messaging. Is this a fair assessment?
  5. I left relations between EIP:ActiveMQ and JMS:Camel in case there are any "big concepts" that I should be aware of between these systems.

Any help in putting a simple-to-understand definition to EIP and in understanding how all these components relate to each other is greatly appreciated. Thanks in advance!

Upvotes: 2

Views: 733

Answers (1)

Jakub Korab
Jakub Korab

Reputation: 5024

  1. ActiveMQ is an implementation of a MOM. It provides a client-side implementation of the JMS API for use by JVM languages. JMS is just an API, but implementations are tied to whatever broker they talk to by a wire format, so you can't use the ActiveMQ JMS implementation to talk to WebsphereMQ, for example. There exist other APIs to talk to ActiveMQ from other language platforms - C/C++ via CMS, .Net via NMS. You can also talk to ActiveMQ via other "non-JMS-like" mechanisms, such as via the STOMP protocol which has client libraries in Ruby, Javascript and others.
  2. Yes.
  3. Yes and no. Camel uses the same "language" as EIPs, so by using Camel, you naturally pick up the EIPs. Having said that, knowing them lets you know what you are looking for in the API. I recommend Camel in Action to get a good understanding of the two, and refer to the EIP site (http://www.eaipatterns.com/) when you want to get a bit more info.
  4. Again yes and no. There are a number of patterns implemented via messaging (JMS is only one flavour), but there are a large number of patterns that have a much broader application (e.g. Splitter, Aggregator). Have a look through the EIP site index to get a feel for this.
  5. Camel can talk to other systems using it's JMS component, which uses any underlying messaging provider that supports that API (Websphere, Sonic, OpenMQ etc.). It can also talk over other messaging technologies, such as those that support the AMQP API.

Hope that helps.

Upvotes: 2

Related Questions