Transactional MSMQ Messages going straight to the Transactional Dead Letter Queue (XactDeadletter)?
We had an interesting error come up with a particular use case in MSMQ Inspector. In short, we had a client using messages from the Journal queue to copy and paste into the original queue for replaying a scenario (a handy trick for testing etc).
The puzzling part was that the messages were being received ten bounced as a dead letter – almost always (not always of course!) We could see them arriving in the queue but immediately going to the local systems transactional dead letter queue (".\XactDeadletter$").
The issue turned out to be that in their circumstances, the message was being copied with a
TimeToBeReceived being copied across as 0. You wanna be quick. The fix?
message.TimeToBeReceived = Message.InfiniteTimeout;
We use Infinite Timeout simply because you are "pasting" a copy of the message, if this was an in house application you would more likely give it a time to live.
The bug fix is in version 18.104.22.168 or later of MSMQ Inspector: