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

Tim Child tim at cantemo.com
Tue Aug 24 14:15:11 BST 2010


I have been reading through the past messages on the mailing list to try and provide some answers.

One part of my application is to provide realtime feedback on jobs going on in the system, there will be a job overview page, which will list the status of x number of jobs (probably about 40), and a job 'detail' page which will have more in-depth information on that job. I have been working with Orbited and Morbidq, and basically it works today by creating STOMP channels for each job, and on going to the detail page of a particular job my Javascript subscribes to the job channel /jobs/jobID  using STOMP. I have a publisher that when there are any updates to the jobs publishes to the channel, and if any consumers are listening on that particular channel the page is updated with the new details.

Now moving over to using RabbitMQ, and the stomp plugin, I understand that my setup will change slightly.

I currently have a VHOST / , and I publish to an exchange, my understanding is that I have to send to a particular exchange "amq.topic" to be able to broadcast to more than one consumer that may or may not be listening. I don't care if my message doesn't ever get received as someone will not always be on the system.

And then my STOMP consumer will listen to VHOST / and amq.topic ? But if I want to replicate my jobs channels, should I create a routing key, binding and different queues for each job? Records of jobs can stay on my system forever, but the period that they get updated is sporadic - much in the first minutes of their life, hardly ever after they have been finished.

It seemed easier to get my publisher to talk AMQP, so my example is more like:

	import stomp
	from amqplib import client_0_8 as amqp
	conn = amqp.Connection(host="myhostname:5672", userid="myusername", password="mypassword", virtual_host="/", insist=False)
        msg = amqp.Message('This is a test message')
        chan = conn.channel()
        chan.basic_publish(msg, 'amq.topic', 'x.#')

My consumer will be javascript, proxied through Orbited using STOMP.

Thanks,

Tim.




More information about the rabbitmq-discuss mailing list