Hi,<div>Still trying to migrate my head over from JMS concepts to RabbitMQ.</div><div><br></div><div>I have a situation that I want to be like this:</div><div><br></div><div>App1 sends a message to anyone who is listening to a certain queue.</div>
<div>I want ALL consumers of that queue to get every message sent by App1, I don't want it dispatched in a round-robin fashion. At the same time, I don't think I want to use a fanout exchange because I don't want all consumers in the vhost to get the message, just the ones that are subscribed to by instances of:</div>
<div><br></div><div>App2</div><div>There are several instances of App2.</div><div>When App2 gets a message, it does some work and sends progress messages back to App1. There is presently only one instance of App1 but I might like to have other consumers in future for the messages that App1 receives. </div>
<div><br></div><div>The problem:</div><div>I can't figure out the right combination of exchange types, queues, and routing keys to get this to work.</div><div><br></div><div>It seems that if I use either 'direct' or 'topic' as my exchange type, the messages that app1 sends are dispatched in a round-robin fashion (that is, not all listeners get every message).</div>
<div><br></div><div>If I set the exchange type to fanout, then app2 keeps sending the same message back to app1 over and over. It could be that I have created an infinite loop of messages back and forth.</div><div><br></div>
<div><br></div><div>Anyway....in JMS headspace I would simply have 2 topics, call them "fromapp1" and "fromapp2" and subscribe each app to the appropriate topic, and it would Just Work....maybe I was doing something wrong back then? Certainly I'm doing something wrong now.</div>
<div><br></div><div>If someone can suggest the pattern I might want to use, that would be great.</div><div><br></div><div>Thanks</div><div>Dan</div><div><br></div>