Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Include Page
Publish and Subscribe Routing
Publish and Subscribe Routing

The normal routing mechanism in JBI uses Queue Semantics, that is each request is routed to one and only one endpoint.

ServiceMix supports an additional routing mechanism which uses Topic Semantics. That is every subscriber who is interested in the message receives a copy of the message.

You can subscribe to the output of an endpoint as follows

Wiki Markup
{snippet:id=subscribe|lang=xml|url=http://cvs.servicemix.codehaus.org/*checkout*/servicemix/base/src/test/resources/org/servicemix/components/jms/example-endpoint-subscription.xml?rev=HEAD}

Notes

Note that the queue semantics and topic semantics are completely mutually exclusive. A single endpoint can have a collection of destination endpoints used to dispatch messages as well as a group of subscribers.

A message is dispatched to its usual JBI destination endpoint, then whether its dispatched or not, its also dispatched to all of its subscribers.

...