[rabbitmq-discuss] Advice needed on new 'feature'

Nemanja Stefanovic nemik at nemik.net
Thu Apr 23 06:32:00 BST 2009


Matthias,

Thank you for replying on this.

The auto_delete's per connection is a good idea. I had considered it but it
seemed like duplicating many bindings per connection per 'primary' queue
might have unnecessary overhead. I suppose there probably wouldn't be more
than a few per user, but how does creating new queues and ~15 or so bindings
for each affect system performance? The other reason for avoiding
re-creation of bindings each time is that the topics are collected from a
user-profile from a database. I really liked the exchange for this reason
because it allowed for minimizing DB-calls. I realize this is probably a
minor point though.

Lastly, the current 'primary' queue allows me to store messages/events in
it, so when the first client connects it can consume past messages and
display them in a "here's what you missed while you were away" kind of case.
I wouldn't be able to get this same behaviour with auto_delete queue's since
(as far as I know) there's no way to 'synchronize' their contents with the
ones of the' primary' queue.

As for acknowledgements, I'm not using them in this case so I'm not too
worried about that.

-Nemanja


On Thu, Apr 23, 2009 at 12:12 AM, Matthias Radestock <matthias at lshift.net>wrote:

> Nemanja,
>
> Nemanja Stefanovic wrote:
>
>  What we want to allow though is for same user (or a default 'guest'
>> account) to log in from multiple places and receive from the same queue. Now
>> one way to do this I suppose would be to create an exchange per user to fan
>> out and have new temporary/auto_delete queue's for each connection
>>
>
> Why don't you simply create an auto_delete queue and bind it to the
> existing topic exchange exactly in the same way as the user's "primary"
> queue?
>
>  So I modified the RabbitMQ-server code to add another boolean attribute to
>> each queue called 'broadcast'. When you declare a queue, you can turn on
>> 'broadcast' (default is false) and that will make all the current/active
>> consumers of the queue receive the message at once instead of round-robining
>> to a single consumer.
>>
>
> How do acknowledgements work in this scheme?
>
>
> Matthias.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/attachments/20090423/4aa72c2e/attachment.htm 


More information about the rabbitmq-discuss mailing list