Getting Started
Architecture
NServiceBus
Transports
Persistence
ServiceInsight
ServicePulse
ServiceControl
Monitoring
Samples

MSMQ Subscription Persistence usage

Component: MSMQ Persistence
NuGet Package: NServiceBus.Transport.Msmq (1.x)
Target Version: NServiceBus 7.x

This sample shows basic usage of MSMQ as storage for subscriptions.

Prerequisites

Ensure that MSMQ has been installed.

Code walk-through

The application publishes an empty event to itself and writes to the console when the event is received.

Configuration

endpointConfiguration.UsePersistence<InMemoryPersistence, StorageType.Timeouts>();
endpointConfiguration.UsePersistence<MsmqPersistence, StorageType.Subscriptions>();

Related Articles