[rabbitmq-discuss] WCF and queue creation

Jonathan Graham Jonathan.Graham at uk.mizuho-sc.com
Fri Jun 11 16:18:29 BST 2010

Hi Emile,

Thanks for your reply. Since my initial message I have taken a look at
the source for the RabbitMQ WCF binding and had concluded what you

I have two WCF services (let's call them A and B) in an existing
application.  I want to send asynchronous, one-way messages from service
A to service B.  The operation being invoked on service B can take some
time to complete, and service A's call to B is due to an end user
initiated operation on A. I don't want to make end users wait for B to
complete, hence the asynchronous requirement.  Service B is also a
little fragile and is not always available, so I want any messages sent
to it to be stored in a durable queue until B is able to process the

At present, I've been using MSMQ to meet these requirement, but for
various reasons, MSMQ has shown itself not to be fit for purpose.  A
colleague of mine recently brought RabbitMQ to my attention and its WCF
binding made it appear as if it could work as a drop-in replacement for
MSMQ, which was ideal as project time constraints mean major re-coding
at this stage is not feasible. Unfortunately because Rabbit's WCF
binding doesn't let us use durable queues, we haven't yet been able to
make use of it.

It looks like the following options are available:

1. Change the way the WCF binding works so that existing queues can be
used and/or that queues declared by the binding can be made durable. (As
an aside, if I can find the time, I wouldn't mind contributing this
change, but I don't have a whole lot of free time at present.)

2. No longer implement service B as a WCF service and instead use the
RabbitMQ .NET client API to consume messages from RabbitMQ.

3. Find some other message queue with WCF bindings.

Your advice would be appreciated.


-----Original Message-----
From: Emile Joubert [mailto:emile at rabbitmq.com] 
Sent: 11 June 2010 15:40
To: Graham Jonathan
Cc: rabbitmq-discuss at lists.rabbitmq.com
Subject: Re: [rabbitmq-discuss] WCF and queue creation

Hi Jon,

All service queues are autogenerated and I can confirm that there is no 
way to make use of an pre-declared queue. Perhaps there is a different 
way of achieving your aim - can you explain your use case?



On 10/06/10 13:11, Jon Graham wrote:
> Hi,
> I've just started trying to use RabbitMQ with WCF.  What I'd like to
be able
> to do is send one way messages to a WCF service and have RabbitMQ
provide a
> durable queue for messages sent to the WCF service.  I have been able
to set
> up a one way messaging example with relative ease, but the problem
> encountered is that the queue is always generated on the fly by the
> WCF client and is automatically deleted when the consumer disconnects
> the broker.
> I used the .NET client to declare a durable queue and bound it using
> same key as was being used in the WCF configuration. Unfortunately,
> RabbitMQ WCF client still creates a non-durable queue with a random
> (e.g. "amq.gen-qJXrh8ZClEjNDG8PsCe4hA==") and uses that rather than
> queue I had declared earlier.
> Is there a way to get the RabbitMQ WCF client to use a pre-existing
> My WCF configuration is as follows:
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
>      <system.serviceModel>
>          <extensions>
>              <bindingExtensions>
>                  <add name="rabbitMQBinding"
> RabbitMQ.ServiceModel, Version=, Culture=neutral,
> PublicKeyToken=null"/>
>              </bindingExtensions>
>          </extensions>
>          <bindings>
>              <rabbitMQBinding>
>                  <binding name="OneWayRMQBinding"
>                           protocolversion="AMQP_0_8"
>                           broker="amqp://MyHost:5672/"
>                           oneWay="true" />
>              </rabbitMQBinding>
>          </bindings>
>          <services>
>              <service
> name="AMQPTests.SimpleMessaging.ServiceImpl.OneWayService">
>                  <host>
>                      <baseAddresses>
>                          <add baseAddress="soap.amqp://amq.direct/" />
>                      </baseAddresses>
>                  </host>
>                  <endpoint address="OneWayService"
>                            binding="rabbitMQBinding"
>                            bindingConfiguration="OneWayRMQBinding"
> contract="AMQPTests.SimpleMessaging.Client.IOneWayService" />
>              </service>
>          </services>
>          <client>
>              <endpoint name="OneWayServiceEndPoint"
>                        address="soap.amqp://amq.direct/OneWayService"
>                        binding="rabbitMQBinding"
>                        bindingConfiguration="OneWayRMQBinding"
> contract="AMQPTests.SimpleMessaging.Client.IOneWayService" />
>          </client>
>      </system.serviceModel>
> </configuration>

This message and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this message in error please delete it and any files transmitted with it, after notifying postmaster at uk.mizuho-sc.com 
Any opinions expressed in this message may be those of the author and not necessarily those of the company. The company accepts no responsibility for the accuracy or completeness of any information contained herein. This message is not intended to create legal relations between the company and the recipient. 
Recipients should please note that messages sent via the Internet may be intercepted and that caution should therefore be exercised before dispatching to the company any confidential or sensitive information. 
Mizuho International plc Bracken House, One Friday Street, London EC4M 9JA. TEL. 020 72361090. Wholly owned subsidiary of Mizuho Securities Co., Ltd. Member of Mizuho Financial Group. Authorised and regulated by the Financial Services Authority. Member of the London Stock Exchange. 

Registered in England No. 1203696. Registered office as above.

More information about the rabbitmq-discuss mailing list