What is the best way to implement the Request / Reply template if there are no time queues?

I have many instances of my client application. These clients send requests to the server application through messaging and receive a response. Typically, a response is sent using a time queue.

Unfortunately, I have to use the Stomp protocol, which has no concept of time queues or themes. (Although the message broker has)

What is the best way to ensure that only the original requestor gets a response? Are there any best practices for this unfortunate situation?

+3
source share
2 answers

, - , . :

  • .
  • JMSMessageID ( ).
  • , JMSMessageID .
  • .

:

  • .
  • .
  • JMSCorrelationID JMSMessageID .
  • .
  • Commit.

: activemq.selector:JMSCorrelationID=.

, , , , .

+4

JMS ( , ) - , .

( setJMSCorrelationID()) . , , . , , .

, , , , , . , , , , , ( JMS HornetQ - ).

, JMS /. API . , JMS.

- (Terracotta, Gigaspaces, Infinispan ..), , , .

+2

Source: https://habr.com/ru/post/1788951/


All Articles