Publish and Subscribe Variations
- Home
- Neuron ESB
- Development
- Developing Neuron Applications
- Topics and Parties
- Topics
- Publish and Subscribe Variations
Neuron ESB offers three hybrids of the publish and subscribe pattern which can be configured with Topics. Specifically List-Based, Broadcast-Based and Content-Based publish and subscribe. These variations can be configured by choosing either a specific Transport for the Topic, or a Message Pattern for the publisher or subscriber.
List-Based Publish/Subscribe
List based publish and subscribe is available when TCP, Named Piple, MSMQ or the RabbitMQ Transport is configured for a Topic. When Parties publish and subscribe to Topics, Neuron ESB maintains a list of topics and subscribers and then notifies each one individually as events occur that they are interested in. Neuron ESB instantiates a publishing service for each Topic which is responsible for matching/maintaining subscriptions and routing messages to the appropriate subscribers. The publishing service is hosted by the Neuron ESB service.
Broadcast-Based Publish/Subscribe
Broadcast based publish and subscribe is simulated when the Peer Transport is configured for a Topic. Although Peer is a mesh of point to point connections, each node in the mesh functions to broadcast the message to its neighboring Parties registered within the mesh. When Parties publish messages to a Topic, that message is broadcast to all neighboring Parties on the mesh, which on receipt re-broadcast it to their neighboring Parties. A Subscriber (Neuron ESB Party) on each active node inspects the Topic of the message. If the listening Subscriber matches the Topic to its own subscription list, the Subscriber processes the messages. In this variation, the responsibility is transferred to the subscriber to either accept the message or discard, based on its own local subscription configuration which is dynamically updated and maintained by the Neuron ESB service.
Content-Based Publish/Subscribe
Within Neuron ESB, content based routing can be configured to augment the existing Topic based subscriptions configured for subscribers regardless of Transport used. In typical Topic based publish and subscribe systems, processes exchange information through a set of predefined subjects (topics) which represent many-to-many distinct (and fixed) logical channels. Content-based systems can offer more flexibility as subscriptions are related to specific information content and, therefore, each combination of information items can actually be seen as a single dynamic logical channel. This exponentially enlarges the number of potential logical channels that can be implemented.
The practical implication of this approach is that messages are intelligently routed to their final destination based on the content of the message.