Note that there are some explanatory texts on larger screens.

plurals
  1. POMassTransit Subscriptions and Receiving Own Messages
    text
    copied!<p>I am trying to implement a proof of concept service bus using MassTransit. I have three applications which need to communicate changes of a common entity type between each other. So when the user updates the entity in one application, the other two are notified.</p> <p>Each application is configured as follows with their own queue:</p> <pre><code>bus = ServiceBusFactory.New(sbc =&gt; { sbc.UseMsmq(); sbc.VerifyMsmqConfiguration(); sbc.ReceiveFrom("msmq://localhost/app1_queue"); sbc.UseSubscriptionService("msmq://localhost/subscription"); sbc.UseControlBus(); sbc.Subscribe(subs =&gt; { subs.Handler&lt;IMessage1&gt;(IMessage1_Received); }); }); </code></pre> <p>There is also a subscription service application configured as follows:</p> <pre><code>subscriptionBus = ServiceBusFactory.New(sbc =&gt; { sbc.UseMsmq(); sbc.VerifyMsmqConfiguration(); sbc.ReceiveFrom("msmq://localhost/subscription"); }); var subscriptionSagas = new InMemorySagaRepository&lt;SubscriptionSaga&gt;(); var subscriptionClientSagas = new InMemorySagaRepository&lt;SubscriptionClientSaga&gt;(); subscriptionService = new SubscriptionService(subscriptionBus, subscriptionSagas, subscriptionClientSagas); subscriptionService.Start(); </code></pre> <p>The problem is that when one of the applications publishes a message, all three applications receive it (including the original sender).</p> <p>Is there any way to avoid this (without resorting to adding the application name to the message)?</p> <p>Thanks,</p> <p>G</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload