I’m trying to implement my own transport for Rebus and I was working on dead-lettering. My test was to try and process a message that doesn’t have any handlers just so it would immediately deadletter.
I noticed that the SendOutgoingMessages
method on the transport is being called and the destination address is the deadletter queue so that seems correct. The message gets sent and I can see them in the dead letter queue. The problem is that the message just immediately retries and it does so infinitely, as if the original message isn’t being acked after being dead lettered so it’s filling up the dead letter queue.
I have not implemented any sort of IErrorHandler
so it’s just the default one running (DeadletterQueueErrorHandler
). There are no errors being thrown during the dead lettering process, the messages are making it to the DLQ, but the original message just keeps coming back around. I’m using default retries (10) but it’s definitely going beyond 10. I’m having to stop it after a few dozen and purge the DLQ while trying to figure this out. Shouldn’t dead-lettering stop the all the retries?
I’m not sure what to check on here. With the exception of the custom transport, since the scenario is “no handlers for this message” I think the pipeline is just running default here. It’s quite possible that what I’m seeing is the server-side/native redelivery compound this — so is there something I need to do to ensure the original message is acked so I can short-circuit that?