Wednesday 15 April 2015

rabbitmq - Topic Based Publishing with EasyNetQ -


I am trying to use topic based routing via easynetQ In my setup I have 3 queues ("ABC", "AC", "BC") and Exchange "X".

  var bus = RabbitHutch is connected to "pre" with all three lines "AB", "AC", "BC", "AC".  

.CreateBus (MQConnectionString) .Advanced; Var Exchange = Exchange. Declaropic ("East"); (Var publishchannel = bus.OpenPublishChannel ()) using {message pat = new message (); Whereas (i ++ & lt; 10) {pat.Name = "Wmese-" + i; Pat.ID = Good. Newguide () ToString (); If (i% 3 == 0) published channel. Publish (exchange, "A.", new message & lt; Message & gt; (pat)); Other published channels Publish (exchange, "AC", new message & lt; Message & gt; (pat)); }}

Here when my code is published "A. ", then the message is not going to be any of the (or) queues I have tried. ". "", "#" Either

please suggest

thank you

You have this wrong way round. You must publish each message with full message key. The queue can be bound with a wild card or a specific binding key to get the right message. If you include the code for your customer, it can be easier to analyze the problem more accurately

No comments:

Post a Comment