[rabbitmq-discuss] fanout exchange that does not keep messages

Brian Whitman brian at echonest.com
Tue Jul 21 14:25:23 BST 2009


Matthias -- I'm not sure how I'm seeing them in the queue list when there
are no consumers. And relatedly perhaps, the broker will crash after 20
hours or so when it runs out of memory, which confuses me as the queue
lengths are always 0.
Here's my steps using the following code:
http://notes.variogr.am/post/143623387/broadcasting-your-logs-with-rabbitmq-and-python

1) Declare a Producer() and start sending messages
 - this does a channel access request, declares the fanout exchange w/
auto_delete=True, then declares the "logger" queue with exclusive False and
auto_delete as True, then binds the exchange and the queue

At this point logger shows up in list_queues with 0 messages. There are
about 8 machines all writing messages to the queue (using immediate=True on
basic_publish.) There are no consumers at this point but the queue "logger"
is in the list.

2) Declare a few Consumers()
 - this does the same channel access request, declare, bind as the
Producer() -- same auto_delete and etc except the queue name is now
"logger-randomUUID" per Conusmer

At this point logger and any logger-randomUUID show up in the list_queues.
Each has 0 messages, always. Everything works as it should... consumers get
messages from the Producers, queue size stays 0.

But...

Memory keeps going
up -- and eventually the broker will crash. Yesterday it lasted about
20 hours. I booted it again this a.m. and am testing with abnormal
message loads (sending millions of messages.) Right
now memory is at 3.9% and increasing after only running 30m.

I am using a newer version on the server, yes, and I will do a test on the
release version to see if that behavior changes. But my guess is I am doing
something else wrong in my queue setup.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090721/09b0fa31/attachment.htm 


More information about the rabbitmq-discuss mailing list