Search code examples
azureazureservicebusmasstransit

Handling Skipped (Deadletter messages) in Masstransit/Azure Service bus


The scenarion we want to protect us from is when deploying several services (microservices application) and a new messages (MessageA) are part of the release. The service that publish the MessageA are deployed before the services that consume MessageA.

This problem causes MessageA to be Skipped, since it has no Consumer listening. But in a few minutes or so there will be consumers up and running.

So, is there a way of:

  • Retry publishing messages before they are skipped
  • Or Handling _skipped queue so we can resend these messages under a short period of time
  • Or Configure DeadLetter to do this. This may disturb Masstransit Deadletter Filter

For clarification. We do not have skipped problem due to missconfiguration. This is just an effort to make deploying services independent easier.


Solution

  • You own your deployment and application lifecycle process, so you are entirely in control of ensuring that your event consumers are deployed prior to deploying any new code that produces those events.

    That said, Azure Service Bus Explorer should let you move skipped messages back into the queue.