[rabbitmq-discuss] Managing and unknown number of responses

Colin Z theczintheroc2007 at gmail.com
Mon May 4 23:40:32 BST 2009


This may be an issue with asynchronous or message-passing based programming
in general...I hope someone can help out...

Basically, I want to send out a query in the form of an AMQ message and
receive back responses from an unknown and possibly large number of
responders.

As an example, let's say we're doing some game logic and we want to figure
out if an action should succeed or not.

My idea was to publish a message to a topic exchange with a routing key like
"magic.success.<characterName>" and then collect all the responses from all
the subscribed subsystems and use their responses to decide if the action
succeeded or not. It's almost like a map-reduce I guess.

It seems like I would either need to set a timeout after which I stop
waiting for responses (seems wasteful and possibly non-deterministic if some
logic takes unusually long to run)

or I somehow need to know in advance how many consumers there are, OR I need
to know how many queues my initial message got delivered to.

Has anyone dealt with something like this before?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090504/749ca256/attachment.htm 


More information about the rabbitmq-discuss mailing list