Note that there are some explanatory texts on larger screens.

plurals
  1. PONservicebus doesn't store subscribers in msmq
    text
    copied!<p>I'm fairly new to NServiceBus and I've got a question.</p> <p>I have a WCF service that is my publisher (I know I shouldn't use publish by wcf). I have another WCF service as subscriber.</p> <p>My problem is that, when second wcf service is going to subscribe to publisher, my publisher doesn't store this information in msmq (when using .MsmqSubscriptionStorage()). But it works when publisher stores subscribers in memory (.InMemorySubscriptionStorage())</p> <p>How to force my bus to use msmq? </p> <p>Below I'll give code of publisher and subscriber.</p> <p>Publisher bus initialization:</p> <pre><code>Bus = NServiceBus.Configure.WithWeb() .DefaultBuilder() .XmlSerializer() .MsmqTransport() .IsTransactional( false ) .PurgeOnStartup( false ) .UnicastBus() .LoadMessageHandlers() .ImpersonateSender( false ) .MsmqSubscriptionStorage() .CreateBus() .Start(() =&gt; Configure.Instance.ForInstallationOn&lt;NServiceBus.Installation.Environments.Windows&gt;().Install()); </code></pre> <p>Publishers config:</p> <pre><code>&lt;configSections&gt; &lt;section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" /&gt; &lt;section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" /&gt; &lt;section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core" /&gt; &lt;/configSections&gt; &lt;MessageForwardingInCaseOfFaultConfig ErrorQueue="error"/&gt; </code></pre> <p>Subscribers bus init:</p> <pre><code>Bus = NServiceBus.Configure.WithWeb() .DefaultBuilder() .XmlSerializer() .MsmqTransport() .IsTransactional(false) .PurgeOnStartup(false) .UnicastBus() .ImpersonateSender(false) .LoadMessageHandlers() .CreateBus() .Start(() =&gt; Confgure.Instance.ForInstallationOn&lt;NServiceBus.Installation.Environments.Windows&gt;().Install()); </code></pre> <p>Subscribers config:</p> <pre><code> &lt;configSections&gt; &lt;section name="UnicastBusConfig" type="NServiceBus.Config.UnicastBusConfig, NServiceBus.Core" /&gt; &lt;section name="MessageForwardingInCaseOfFaultConfig" type="NServiceBus.Config.MessageForwardingInCaseOfFaultConfig, NServiceBus.Core" /&gt; &lt;section name="MsmqTransportConfig" type="NServiceBus.Config.MsmqTransportConfig, NServiceBus.Core" /&gt; &lt;/configSections&gt; &lt;MessageForwardingInCaseOfFaultConfig ErrorQueue="error"/&gt; &lt;UnicastBusConfig&gt; &lt;MessageEndpointMappings&gt; &lt;add Messages="Messages" Endpoint="FirstService" /&gt; &lt;/MessageEndpointMappings&gt; &lt;/UnicastBusConfig&gt; </code></pre>
 

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