Being new to the world of NServiceBus, I just thought I’d share a few gotcha’s as I experience them.
When everything’s up and running there’s no easy way to see what’s going on as messages appear and disappear from the normal message queue very quickly. You can use an audit queue to log all messages appearing on a queue. To do this, in your app config you simply need to use the ForwardReceivedMessagesTo attribute, like so:
<UnicastBusConfig ForwardReceivedMessagesTo="[email protected]">
NServiceBus won’t automatically create an audit queue, so when you do so manually.
You can do this in code using:
Alternatively, you can create it using the admin interface, but you need to ensure it has the same settings and permissions as the NServiceBus queues. Notably, that SYSTEM has permissions on the queue, and that it is transactional (if your queue is) – otherwise your audit queue will remain empty!