[rabbitmq-discuss] C# Work Queue Question

Emile Joubert emile at rabbitmq.com
Wed Feb 9 11:14:00 GMT 2011


Hi Adam,

On 09/02/11 01:27, adam.rosenberger1 at gmail.com wrote:
> Hello,
>
> I am new to RabbitMQ and was working on translating the work queue
> example into c# [http://www.rabbitmq.com/tutorial-two-python.html]. I've
> done some googling and read through a fair amount of documentation on
> the rabbit site, but I must be missing something. I can't seem to figure
> out why the following scenario works, but the other one doesn't:
>
> Works: Start two clients, then start the server that provides the tasks.
> Does not Work: Start the server that provides the tasks, then start two
> clients.
>
> When I start the server first, only the first client receives messages.

Are you forgetting to set QoS on the channel? ( http://bit.ly/iiUWyh )

Between starting the first and second client, the first client will have 
an opportunity to get all the messages if they can be processed fast 
enough. Try adding more dots to have the tasks take longer to complete. 
Subsequent work items that are issued once both workers are running and 
that involve comparable effort should be shared evenly between workers.

If this still doesn't work then feel free to share your code.


Regards

Emile




More information about the rabbitmq-discuss mailing list