In JMS, what is Publish/Subscribe Messaging?

In JMS, what is Publish/Subscribe Messaging?

Ninja Asked on 19th September 2018 in JMS.
Add Comment
1 Answer(s)
Best answer

In a publish/subscribe (pub/sub) product or application, clients address messages to a topic. Publishers and subscribers are generally anonymous and can dynamically publish or subscribe to the content hierarchy. The system takes care of distributing the messages arriving from a topic’s multiple publishers to its multiple  subscribers. Topics retain messages only as long as it takes to distribute them to current subscribers.

Pub/sub messaging has the following characteristics:

  • Each message can have multiple consumers.
  • Publishers and subscribers have a timing dependency. A client that subscribes to a topic can consume only messages published after the client has created a subscription, and the subscriber must continue to be active in order for it to consume messages.

Use pub/sub messaging when each message can be processed by more consumers.

Ninja Answered on 19th September 2018.
Add Comment