Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In messaging systems, message routing is done on the basis of a concept called Topics: First, we need to have topics . When a particular user wants to publish a message to a particular sector, he creates a topic typically with a name relevant to the messages to be published. For example, to publish messages related to sports, a topic by the name of 'SportsNews' can be created and messages related to sports news can be published under that topic.Users can then subscribe to selected topics and receive the messages published to that topic by the publishers. According to this example, a user interested in sports can subscribe to the 'SportsNews' topic. This way, the user can continue to receive messages published to that topiccreated in the message broker (WSO2 MB). A JMS client can then be configured to publish messages to this topic and other JMS clients can be configured as subscribers of this topic. When the publisher sends a message to the topic, it will be dispatched to all the JMS clients that are subscribed to that topic.

For example, consider that we have a topic called 'SportsNews' created in the message broker. We can now have users (JMS clients) publishing messages related to sports news to this topic. Users (JMS clients) that are interested in sports news can subscribe to this topic and receive the messages that are published.

The following flow diagram depicts how messages are published to topics and how users subscribesubscribers consume the messages:

Message Publish-Subscribe Flow of Topics

The topics and subscriptions management capability in WSO2 Message Broker is provided by the following feature in the WSO2 feature repository.

...