[rabbitmq-discuss] 2 WCF services on the same queue

Emile Joubert emile at rabbitmq.com
Thu Dec 1 11:13:37 GMT 2011

On 01/12/11 06:09, Shaun Ziyan Xu wrote:
> I would like to scaling out my application service and decided to use a
> distributed queue to receive the client request, and multiple services
> listening on the same queue. I think this is very common pooling-based
> pattern.
> I'm trying to use RebbitMQ with WCF binding, and when I use one client
> and one service to works well. But when I created 2 services I found
> when the client invoked, it gave me an exception said the
> CommunicationObject State was Fault.

Unfortunately each Service creates a new AMQP binding and a new queue
for requests. Therefore each Service will receive all requests, leading
to the errors you see.

If you want to use WCF then you could create separate endpoints for each
worker and to round-robin at the request stage.

If you do not need to use WCF then use the RabbitMQ .net client directly
and follow the Work Queues and RPC tutorials:

You will find C# implementations here:



More information about the rabbitmq-discuss mailing list