I wonder if it is possible to modify NServiceBus message in order to get the stored value on the next message handling attempt? To be more specific on use case: inside Nsb handler we’re calling service feeding number in certain range by round-robin like 1,2,3,4,5, 1,2,3,4,5, 1,… It’s important to utilize all released numbers eventually (after retries or after error queue re-processing). The easiest approach would be to store the next released number (one per handler call) inside the message, and if some exception occur down the road, on the next retry we’ll be able to check the number stored in the message, and if it’s not null, then just take another attempt to use it, no need to make another call to service-feeder.
As a workaround I think it could be 2 different handlers that runs the number feeder service and process the number, but makes things a bit more complicated, with more messages moving around. Before tackle to it, I would like to make sure there is no better solution. Thanks