Prerequisites
Ensure that MSMQ has been installed.
Code walk-through
This sample shows basic usage of MSMQ as a transport for NServiceBus. The application sends an empty message to itself and writes to the console when the message is received.
Configuration
var endpointConfiguration = new EndpointConfiguration("Samples.Msmq.Simple");
endpointConfiguration.UseTransport(new MsmqTransport());
Other settings such as usage of dead-letter queues, journaling, etc., can be configured using the configuration API.