jojo jojo - 5 months ago 19
Python Question

Pass data between queues - Stomp

Is it possible to share data between queues in stomp? We have a new project and my task is pass data from one queue to another. Consider a system with ActiveMQ and Stomp. In this system I have find a message that return by queue1 and pass to queue2. This doesn't make much sense to me. Any advice about this issue would be appreciated.

Use Case:

I have an application like this:


  • queue1 : make query from ldap and find user

  • queue2 : make query from exchange server with given user



I want to use "user" founded from queue1 for query in queue2

Answer Source

Yes, you can move messages between queues within the same broker, or across brokers.

Same broker use case:

Application sends message to queue1 on brokerA. Using ActiveMQ's Composite Destination support, you could configure brokerA to also deliver the message to queue2 on brokerA.

Different broker use case:

Application sends message to queue1 on brokerA, the messages are then passed queue2 on brokerB using a bridge, or an ActiveMQ network connector.

Additionally, code could read a message from queue1 on brokerA, perform some processing and then publish the message to queue2 on brokerB.

As Tim mentioned in his comment, additional detail identifying which use case applies to you is needed in order to recommend the best solution.