I created an nservice application.
the application listen to queue A, do some processing if there is a message from queue A.
then send another message to queue B.
Below is the way i start my 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 start my application. there is always a message in the “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 there anything wrong with my application? coz i didnt sent anything to QueueB.
it is an empty application.
CompletionMessage is one of the internal message types that NServiceBus uses to manage itself. NServiceBus uses it to initialize itself, for passing return codes via the IBus.Return() method, and for acknowledging subscribe and unsubscribe requests.
Generally, you should just ignore these messages completely.