[rabbitmq-discuss] RabbitMQ, STOMP, Python and Orbited - design question.

Marek Majkowski majek04 at gmail.com
Tue Aug 31 14:01:39 BST 2010


Tim,

On Fri, Aug 27, 2010 at 15:32, Tim Child <tim at cantemo.com> wrote:
> I was going to use py-amqplib with Tornado.
>
> You are right I don't want just a single consumer per job, I want to be able to attach multiple consumers. I don't care if the messages are lost because no one is looking at them in this case.
>
> My use case for queue for all jobs isn't very strong - getting an overview of what is happening on multiple jobs at the same time. Another use case for me, is that upon a certain message on the queue, I can hook up jobs - such as starting other jobs off when a job is finished..
>
> So basically what you are saying is that I can't have multiple consumers in the way I want? What about if I was building a stock ticker watcher - hundreds of clients viewing what is happening to the same 20 stocks? Its the same scenario. Would this be done in using the exchange mechnism you are proposing?

Of course you can. You just need to publish messages to "exchanges"
using meaningful routing keys and you need to create a single queue
for every web page view (or session). And use "bindings" to bind
together exchanges with queues (or use some similar architecture).
What you can't do is to publish a message _directly_ to the queue. As
this implies that only a single consumer will be able to pick it up.
It won't be duplicated. If you want it to be duplicated - use
exchanges. See the STOMP broadcast example.

Cheers,
  Marek Majkowski


More information about the rabbitmq-discuss mailing list