This sample shows basic usage of MSMQ as storage for subscriptions.
Ensure that MSMQ has been installed.
The application publishes an empty message to itself, via the MSMQ transport, and writes to the console when the message is received.
Note that the default queue name,
NServiceBus., is overridden to avoid sharing the subscription storage queue with other endpoints on the same machine. The queue name is
var persistence = endpointConfiguration.UsePersistence<MsmqPersistence, StorageType.Subscriptions>(); persistence.SubscriptionQueue("Samples.Msmq.Persistence.Subscriptions"); endpointConfiguration.UsePersistence<InMemoryPersistence, StorageType.Timeouts>();