Loading ...

Wcf Rabbitmq Binding

Hello everybody,

recently I've spent plenty of time with the following task: Create Publisher/Subscriber application that via WCF send/receive messages from RabbitMQ. As foundation for my code I've used code from Dieg web site, just modified binding.

Bindings were modified in App.config files. 

Below goes bindings declarations:

 <system.serviceModel>
    <extensions>
      <bindingExtensions>
        <add name="rabbitMQBinding"
             type="RabbitMQ.ServiceModel.RabbitMQBindingSection, RabbitMQ.ServiceModel, Version=3.5.7.0, Culture=neutral,PublicKeyToken=null"/>
      </bindingExtensions>
    </extensions>
    <client>
      <endpoint address="soap.amq:///myqueue"
          binding="rabbitMQBinding"
          bindingConfiguration="rabbitMQConfig"
          contract="testFancyProxyContracts.ISampleContract"
          name="AMQPCalculatorService" />
    </client>
    <bindings>
      <rabbitMQBinding>
        <binding name="rabbitMQConfig"
          hostname="rabbit.test"   
          port="5672"
          username="guest"
          password="guest"
          virtualHost="/"
          oneWay="true"
          maxmessagesize="8192" />
      </rabbitMQBinding>
    </bindings>
  </system.serviceModel>

 

Be the first to rate this post

  • Currently 0.0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5