<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Does it need to be one queue? If you use a topic exchange and create a
queue for each consumer, you get a copy of each message in each queue
filtered by your queue bindings. You could even have a shared queue for
each consumer type so the messages are not duplicated in context.<br>
<br>
Sam<br>
<br>
<br>
On 25/01/11 12:00, Dan Tenenbaum wrote:
<blockquote
cite="mid:AANLkTinPU2EhHXhCUm+Wkzj4gKBH4zir-p7GY77X1_wm@mail.gmail.com"
type="cite">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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
rabbitmq-discuss mailing list
<a class="moz-txt-link-abbreviated" href="mailto:rabbitmq-discuss@lists.rabbitmq.com">rabbitmq-discuss@lists.rabbitmq.com</a>
<a class="moz-txt-link-freetext" href="https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss">https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss</a>
</pre>
</blockquote>
</body>
</html>