[rabbitmq-discuss] Fanout exchange not playing ball?

Rich Kim rich.kim at db.com
Mon May 18 22:31:29 BST 2009


Taking a stab at this one, but have you setup your two listening clients 
with separate queue names? When using a fanout exchange and binding queues 
to the exchange, when you attach the second listener to the exchange, the 
queue name is already found, and therefore performs a NOOP. Both listeners 
share the same queue name, and thereafter begin round-robin like behavior. 


Create two listeners with distinct queue names, and you should see your 
expected behavior.

________________________
Richard Kim
Deutsche Bank Americas
Global Banking, New York
rich.kim at db.com
P: +1 212.250.4984



Tim Perrett <tperrett at googlemail.com> 
Sent by: rabbitmq-discuss-bounces at lists.rabbitmq.com
05/18/2009 05:27 PM

To
RabbitMQ Discuss <rabbitmq-discuss at lists.rabbitmq.com>
cc

Subject
[rabbitmq-discuss] Fanout exchange not playing ball?






Hey guys,

I've setup a fanout exchange and my expectation does not match the
output... My expectation was that using a fanout exchange all
listening clients would get all messages - however this doesn't appear
to be the case. I started two separate instances of the same
application and run the listeners - I then publish a message into the
exchange, and it appears that App1 gets a message, then App2 gets
nothing. I send another message into the queue and then App2 gets the
message but not App1 - im a little lost how this could happen?

My creation code looks like:

    val ticket = channel.accessRequest("/data")
    channel.exchangeDeclare(ticket, "mult", "topic")
    channel.queueDeclare(ticket, "mult_queue")
    channel.queueBind(ticket, "mult_queue", "mult", "example.*")
    channel.basicConsume(ticket, "mult_queue", false, new
SerializedConsumer(channel, this))


Any ideas / suggestions?

Cheers, Tim

_______________________________________________
rabbitmq-discuss mailing list
rabbitmq-discuss at lists.rabbitmq.com
http://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss



---
This communication may contain confidential and/or privileged information.
If you are not the intended recipient (or have received this communication
in error) please notify the sender immediately and destroy this
communication. Any unauthorized copying, disclosure or distribution of the
material in this communication is strictly forbidden.

Deutsche Bank does not render legal or tax advice, and the information
contained in this communication should not be regarded as such.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090518/1313eb03/attachment.htm 


More information about the rabbitmq-discuss mailing list