Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the responsibility of a JMS broker in the JMS Eco system?

Tags:

jms

I was reading this question and the corresponding answer and got confused by the term JMS broker in the first line of the answer :

MS (ActiveMQ is a JMS broker implementation)

I want to know what exactly is a JMS broker and what are its responsibilities ?

Wikipedia page on JMS lists out several elemnents in JMS eco system but doesn't mention about brokers as such.

like image 819
Geek Avatar asked Jan 04 '13 07:01

Geek


People also ask

What does a JMS broker do?

The JMS Broker Between the sender and receiver (aka producers and consumers) is a broker – an application server – that receives messages from producers and sends messages to consumers. The producers and consumers are completely decoupled.

Is JMS a message broker?

Message brokers come in different variations based on their individual features. Some of the most popular brokers are JMS and Kafka, and both are used in EAI practice.

What is difference between JMS and ActiveMQ?

What Is the Difference Between JMS and ActiveMQ? ActiveMQ is a JMS provider. A JMS provider forms the software framework for facilitating the use of JMS concepts inside an application. A single node of ActiveMQ which allows clients to connect to it and use these messaging concepts is called an “ActiveMQ Broker.”


1 Answers

There is not really an official definition for what a JMS broker is, but there is conceptual difference between a message queue and broker. Here is my take on it.

  • A message queue only looks at the message headers to figure out where to send the message, the message queue does not examine the message body or execute any code that transforms the content of the message body. Message queue mission is to deliver message, eventually, once and only once, and in order that they were sent.
  • A message broker provides a programming environment where you can write message transformation code easily and efficiently. For example you might need to transform the content of a message from format A to format B and you don't want old clients that use format A to have to be re-written so you write a message translator program and deploy it to the message broker. In this case the message broker will be a separate process possibly running on a separate machine that is responsible for running message processing code.

The big value of message brokers is that they can do some really nice things for you for handling message concurrently, fail-over for processing logic, deploying of processing logic, monitoring and logging ... etc. Think of a message broker as a specialized application server for writing message processing code, possibly in a custom high level language. For example IBM message broker can be programmed in a ESQL an extension of SQL along with a diagrams and nodes that you connect with each other. Programs written for a message borker will be shorter than if you wrote all the code yourself using plain JMS.

Brokers can be centralized or distributed, so for example you can have a central broker in New York, an have clients in London and Hong kong connected to it. Or you could have the broker be distributed and have an instance running in London and Hong kong which do the message processing closer to the source / destination of the message, it will all depend on your management infrastructure and what other resources like databases the message broker needs to talk to.

like image 132
ams Avatar answered Nov 05 '22 05:11

ams