Vaibhav Gargs wrote:
5. What is the use of broker in JMS?
Officially, I don't think JMS mentions the use of the broker. In fact, there are JMS implementations for brokerless messaging environments.
In my opinion though, JMS does seem to require a broker. Or at least, its design assume the use of one. For example, JMS doesn't have a concept of a Durable Publisher. This is fine due to ordering by the broker, but for brokerless messaging environments, there is no easy way to order between publisher restarts.
PS... I don't use Rabbit or Kafka, so can't answer that one.
You can however connect Kafka to a JMS message queue by writing a back-to-back application which consumes from one side and produces to the other, or by using a Kafka Connector such as Confluent's Kafka Connect JMS Connector.
Vaibhav Gargs wrote:5. What is the use of broker in JMS?
A broker, like in real-life, is there is facilitate transactions between producers and consumers.
It decouples producers and consumers so that they do not need to deal with each other directly. The producer does not need to be concerned with who is consuming their content, and the consumer does not need to be concerned with where the content came from.
I will open the floodgates of his own worst nightmare! All in a tiny ad:
Programmatically Create PDF Using Free Spire.PDF with Java