IBM MQ publishes / signs message sending to one subscriber

I want to create a publish / subscribe program to calculate matrix manipulation in a cluster.

When a publisher sends a message to a topic, the message copies to all subscribers.

I want a copy of the message to be sent to one subscriber, and the message is deleted and not sent to other subscribers.

+5
source share
2 answers

There are two ways to do this.

  • Make an administrative subscription and all subscribers will read the messages from the queue pointed to by the subscription.
  • Use MQ V8.0, the new JMS 2.0 interface and General Subscription .

Note that in both cases, all subscribers are connected to the same queue manager. Although Pub / Sub creates one logical message when it is sent to other queue managers, it becomes several physical messages, and their consumption by subscribers is not coordinated throughout the network.

+3
source

Use a queue, not a topic. Topics are for one-to-many publishing, queues allow multiple listeners, but each message is delivered to only one listener.

0
source

All Articles