Publish Subscribe using Topic

Publish  Subscribe  using Topic  

 

This is a variant of publish/subscribe design pattern.  In this design pattern there are multiple subscribers for a single message. We need JMS Topic to implement the same. Each subscriber is given a single copy of the messages. In case of durable subscription, messages will be retained for the subscriber which is not normally  available at particular point of time.

 

When considering zero message loss policy, it is convenient to use virtual topic concept provided by some messaging provider. Messages are published to the topic. But messages are forwarded to the different queue as per predefined policies. Subscriber process consumes the messages from the corresponding queue. In this way message tracking are easy. If messages has persistence storage then, there will be zero message loss.