[rabbitmq-discuss] Design for Comet

tsuraan tsuraan at gmail.com
Fri Feb 24 16:13:25 GMT 2012

> Does it mean that every page is user specific? Or is "user" exchange
> not for per-user messages but rather global ones?

The user exchange is for messages that are addressed to specific
users, so every web page that a given user has open (on all their
different browsers, etc) would get all messages addressed to that
user.  Global messages get sent to all pages that are opened in all
browsers, topic messages get sent to all subscribers to a topic, and
there are "page" messages that are targeted towards a specific
instance of a page (i.e. a specific tab that's opened on one of our

> Like always - you need to prototype and benchmark it :)

Yeah, I'm really wondering about hidden things, like "that will work
for a week, but then mnesia will start on fire" or something to that
effect :)

> But generally, I would probably go for a different setup.
> I think we can assume with reasonable confidence that number
> of concurrent users on your site is constant. (as opposed to
> dynamic pages AFAIU)
> So why not create queue-per-user? (for users actively browsing).
> When user enters a page - you can subscribe the queue to a per-page
> exchange. When user navigates away - you unsubscribe.

Ok, I think I'm missing something.  Are you saying to create per-page
exchanges rather than per-page queues, and then subscribe the
exchanges to queues?  Is it cheaper to create exchanges than to create
queues?  Also, binding a queue to an exchange isn't something I was
aware could be done; does it just use the normal queue.bind command,
but putting the exchange name where the queue name normally goes, and
vice versa?

> Hope that helps,
>  Marek

It's an idea that I had never thought of, anyhow :)  Thanks!

More information about the rabbitmq-discuss mailing list