I created an nservice application.
the application listens on queue A, does some processing if there is a message from queue A. then send another message to queue B.
The following is a way to start the nservice bus
_bus = NServiceBus.Configure.With() .Log4Net() .DefaultBuilder() .XmlSerializer() .MsmqTransport() .IsTransactional(true) .PurgeOnStartup(false) .UnicastBus() .ImpersonateSender(false) .LoadMessageHandlers() .CreateBus() .Start();
And here is the configuration:
<MsmqTransportConfig InputQueue="DemoQueueA" ErrorQueue="DemoQueueAError" NumberOfWorkerThreads="1" MaxRetries="5" /> <UnicastBusConfig DistributorControlAddress="" DistributorDataAddress=""> <MessageEndpointMappings> <add Messages="Demo.Messages" Endpoint="DemoQueueB"/> </MessageEndpointMappings> </UnicastBusConfig>
When I run my application. there is always a message in "DemoQueueB"
<?xml version="1.0"?> <Messages xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.net/NServiceBus.Unicast.Transport"> <CompletionMessage> <ErrorCode>0</ErrorCode> </CompletionMessage> </Messages>
So is something wrong with my application? coz I did not send anything to QueueB. This is an empty application.
source share