How can I control message lost from nServicebus
I have a nServicebus application,now my application reads messages from handler and remove the messages from bus automatically. But what I want is that after re开发者_Go百科triving messages from Handler it should not remove messages from bus.And after my message processing which is done by my code, I will remove the message from bus. It means I have to control the messages.
Thank in advance
Susanta Samanta
NServiceBus runs all handlers in a TransactionScope, that means that if your code throws an exception the message will be put back in the queue and retried later. So you shouldn't worry about catching any exceptions/managing how messages get removed from the queue, NSB takes care of that for you.
If you can provide some more info on what you're trying to do I might be able to help you some more?
精彩评论