Friday, January 21, 2011

RabbitMQ talks

Three valuable links to understanding RabbitMQ and Celery:

In Celery the routing_key is the key used to send the message, while binding_key is the key the queue is bound with. In the AMQP API they are both referred to as the routing key.

Celery automatically creates the entities necessary for the queues in CELERY_QUEUES to work (except if the queue’s auto_declare setting is set to False). This statement implies then it will do all the work to talk to the RabbitMQ server to create the defined exchange name.

Useful commands:
camqadm queue.purge 
celeryctl inspect active
rabbitmqctl list_queues name memory
rabbitmqctl -p  list_queues
rabbitmqctl -p  list_exchanges

The non-AMQP backends like ghettoq does not support exchanges, so they require the exchange to have the same name as the queue. Using this design ensures it will work for them as well.

Don’t store task state. Note that this means you can’t use AsyncResult to check if the task is ready, or get its return value.

No comments:

Post a Comment