[rabbitmq-discuss] WCF and queue creation

Jon Graham Jonathan.Graham at uk.mizuho-sc.com
Thu Jun 10 13:11:48 BST 2010


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>
-- 
View this message in context: http://old.nabble.com/WCF-and-queue-creation-tp28842204p28842204.html
Sent from the RabbitMQ mailing list archive at Nabble.com.



More information about the rabbitmq-discuss mailing list