I have an application using NServiceBus to process messages, and while debugging I'm finding that exceptions may be thrown, and the message is lost. I've checked both the main and error queues, and the message was only attempted once.
Are there any common pitfalls that could cause this to happen?
I use NServiceBus 2.0.0.1219 (2.0 RTM) on Windows 7 64 bit. Other question with same issue on older version: What could prevent NServiceBus from moving messages to the error queue if there are exceptions when processing?
The website Bus.Send a command to the command handler endpoint.
Website Config File:
<MsmqTransportConfig InputQueue="WebAppTest_InputQueue" ErrorQueue="ErrorQueue" NumberOfWorkerThreads="1" MaxRetries="5"/>
<UnicastBusConfig ForwardReceivedMessagesTo="AuditQueue">
<MessageEndpointMappings>
<add Messages="ABC.ServiceBus.Commands" Endpoint="CommandProcessor_InputQueue"/>
</MessageEndpointMappings>
</UnicastBusConfig>
<DBSubscriptionStorageConfig>
...
</DBSubscriptionStorageConfig>
Command Handler Config File:
<MsmqTransportConfig InputQueue="CommandProcessor_InputQueue" ErrorQueue="ErrorQueue" NumberOfWorkerThreads="1" MaxRetries="5" />
<UnicastBusConfig ForwardReceivedMessagesTo="AuditQueue">
<MessageEndpointMappings>
<add Messages="ABC.ServiceBus.Commands" Endpoint="WebAppTest_InputQueue"/>
</MessageEndpointMappings>
</UnicastBusConfig>
<DBSubscriptionStorageConfig>
...
</DBSubscriptionStorageConfig>