ActiveMQ could be a component in what you want to do, but it isn't really a specific message queuing feature but more of a design pattern. I'm pretty sure you could also do it with Amazon SNS (but I'm not familiar with the API).

The general pattern for request/reply messaging is to put a reply destination (I.e. Queue name) in the header of the request message. You may also want to use a correlation ID in the header if you're going to be sharing the request/reply queues with other messages concurrently.

So, the producer sends the message to the request queue/topic with a reply queue in the header, the consumer(s) process the message and put their reply in the reply queue. The producer listens on the reply queue and gathers the replies.

If you only expect one reply, it is a little easier. With multiple replies you would need to implement something like the Aggregator pattern. Apache Camel has a framework for this ( but I'm sure Mule has something similar.


 | Mike Pilone | Software Architect, Distribution | | o: 202-513-2679  m: 703-969-7493

From: "robert.piskule" <>
Reply-To: "" <>
Date: Wednesday, September 12, 2012 12:24 PM
To: "" <>
Subject: New to this

Hey everyone, I wanted to know if apache MQ could suit our need, in if so,
how would I go about it?

Here's what we want:
An http client publishes a request
Several servers respond to the reqest (each providing different information)
Something stitches the responses together and sends it back to the client

I can handle the multiple dispatches with MULE, and Amazon SNS is a pub sub
system... but I don't know how in the world I could have the servers respond
back to the original client in the pub-sub model.

Would the servers dispatch a new message that the client listens for?

View this message in context:
Sent from the ActiveMQ - User mailing list archive at