[rabbitmq-discuss] Python & RabbitMQ — Communicate Between Parent & Children?

csharpplusproject at gmail.com csharpplusproject at gmail.com
Mon Jul 18 16:24:18 BST 2011


Hi Matthias,

Thank you for your response.

Yes, I have gone through your tutorial.

It looks like the (workers --> parent) case is handled by a code similar to your FIRST example.

Also, it looks like the (parent --> workers) case is handled by a code similar to your THIRD example (parent is a publisher, fanout, all workers are consumers).

I was able to combine both cases into one piece of code, and it works.

The problem that I have is that the code *hangs* on sending / receiving messages, leaving no room for my actual app to run.

I think this is due to the 'start_consuming' function call, which runs infinitely and won't let any code underneath it to get executed.

Is there a way to have the messaging run in the *background* -- thus, not blocking the regular work of the app?

Thanks,
Shalom.
------Original Message------
From: Matthias Radestock
To: csharpplusproject at gmail.com
Cc: Jason J. W. Williams
Cc: rabbitmq-discuss at lists.rabbitmq.com
Sent: Jul 18, 2011 08:59
Subject: Re: [rabbitmq-discuss] Python & RabbitMQ — Communicate Between Parent & Children?

On 15/07/11 22:51, csharpplusproject at gmail.com wrote:
> The workers' messages to the parent are independent of the parent's
> message to the workers. These are two separate things that work in
> parallel.
>
> Note that the parents sends *the same message* to all workers, while
> (separately) each one of the workers sends *its own unique message*
> straight to the parent.

As Jason suggested, the parent->child messaging could be accomplished 
with a fanout exchange an private per-worker queues.

And for the child->parent communication, just get the parent to create a 
queue with a well-known name and get the children to publish to that via 
the default exchange.

> I am brand new to rabbitMQ -- is it possible to provide some further
> info / code snippets that would allow me to get a better sense of
> things?

If you haven't done so already, please go through our tutorials at 
http://www.rabbitmq.com/getstarted.html


Regards,

Matthias.


Sent via BlackBerry from T-Mobile


More information about the rabbitmq-discuss mailing list