[rabbitmq-discuss] WCF and queue creation

Emile Joubert emile at rabbitmq.com
Fri Jun 11 15:39:34 BST 2010



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?

Regards

Emile


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 I've
> encountered is that the queue is always generated on the fly by the RabbitMQ
> WCF client and is automatically deleted when the consumer disconnects from
> the broker.
>
> I used the .NET client to declare a durable queue and bound it using the
> same key as was being used in the WCF configuration. Unfortunately, the
> RabbitMQ WCF client still creates a non-durable queue with a random name
> (e.g. "amq.gen-qJXrh8ZClEjNDG8PsCe4hA==") and uses that rather than the
> queue I had declared earlier.
>
> Is there a way to get the RabbitMQ WCF client to use a pre-existing queue?
>
> My WCF configuration is as follows:
>
> <?xml version="1.0" encoding="utf-8" ?>
> <configuration>
>      <system.serviceModel>
>          <extensions>
>              <bindingExtensions>
>                  <add name="rabbitMQBinding"
>                       type="RabbitMQ.ServiceModel.RabbitMQBindingSection,
> RabbitMQ.ServiceModel, Version=1.0.110.0, 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>



More information about the rabbitmq-discuss mailing list