Can we use the request / response model in a publication / subscription?

O'Reilly Media's "Java Messaging Service" says:

Use the request / response model in point-to-point messaging.

We can use the message selector in pub / sub messaging, so writing a request / response model is as simple as writing a simple selector in the subject of the response:

  • the publisher publishes a message with some unique property (such UUIDas correlationID)
  • the subscriber is responsible for the message with the same UUIDascorrelationID
  • the publisher (also a subscriber to the subject of the reply) selects messages with the sent one UUID.

Is this the wrong template?

+5
source share
1 answer

/ , . . . .

pub/sub, . , . , , . .

, / P2P, Pub/Sub.

+2

All Articles