Intercepting publications
We can intercept a publication, modify it, and then republish it before it reaches any other subscriber.
We might want to intercept a publication before it reaches a subscriber in order to do one of the following actions:- Attach additional information to the message
- Block the message
- Transform the message
We can perform the same operation on each message or vary the operation depending on the subscription, the message, or the message header.
- Subscription levels
Set the subscription level of a subscription to intercept a publication before it reaches its final subscribers. An intercepting subscriber subscribes at a higher subscription level, and republishes at a lower publication level. Build a chain of intercepting subscribers to perform message processing on a publication before it is delivered to final subscribers. - Intercepting publications and distributed publish/subscribe
Follow a simple pattern when you deploy intercepting subscribers or Publish exits to a distributed publish/subscribe topology. Deploy intercepting subscribers on the same queue managers as publishers, and Publish exits on the same queue managers as final subscribers.
Parent topic: Writing publish/subscribe applications
Related information