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

Brian Whitman brian at echonest.com
Tue Jul 21 15:31:36 BST 2009


>
> 1) no consumers ever subscribe to the "logger" queue. Why do you have the
> logger queue at all?
>

This was my bad-- I for some reason thought you needed to declare a queue to
send messages to an exchange. Fixed that now, no more "logger" queue.


> 2) You are setting immediate=true. I'd advise against that, for reasons
> I explained earlier. Setting exclusive or auto_delete on the queues, so
> that they disappear when the consumers vanish, should be sufficient.


So I changed this now, exclusive=True and auto_delete=True and
immediate=False on the Producer. This fixes the "memory leak." Everything
works the way I want and there's no mem usage growth or eventual crash. This
is on 1.6.0 BTW. I guess it had something to do w/ immediate=True, but I'm
not positive.


Also, if you still see the problem then, please post precise instructions on
> how to reproduce it -


If you want to see the mem growth, use the code (I've updated it) in my blog
post but just add immediate=True to the basic_publish command. Then I just
did

b = Producer()
for x in xrange(1000000):
    b.message({"message":"a long message", "id":str(x)})

and you can just watch the mem increase, whether you have consumers or not.
(only if immediate=True is on)

thanks for all the help, I think we're doing good now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090721/24569954/attachment.htm 


More information about the rabbitmq-discuss mailing list