Skip to content


Infrastructure | Currently we do not retry failed commands on receive side #199

manikrish opened this Issue · 4 comments

2 participants


#75 states that we do retry. However in the current code base we currently deadletter the messages immediately without doing retries ( checking delivery count etc). Looks like some of the code went missing ( possibly when merge happened?)
// TODO: exception between these two?
message.Async(message.BeginComplete, message.EndComplete);
catch (Exception)
// TODO: retries, retry count, Abandon vs DeadLetter?
// Just: if (args.Message.DeliveryCount > 5) ?
args.Message.Async(args.Message.BeginDeadLetter, args.Message.EndDeadLetter);

if (args.Message.DeliveryCount > 5)
// dead letter.

@kzu kzu was assigned
@kzu kzu referenced this issue from a commit
Commit has since been removed from the repository and is no longer available.

The correct way to do this is to
1. to abandon the message before the max delivery count is exceeded. ( separate bug on this).
2. it should be possible to set the MaxDeliveryCount on SubscriptionDescription instead of explicily dead lettering the messages.


If we set maxdeliverycount to 5 when we create the subscription, as per the service bus documentation, aftter 5 times the message will be deadlettered by the infrastructure.
Assuming things work the way its documented- the choice of whether to explicity check deliverycount and dead letter the message would depend on whether we want to do some thing extra (like set error description etc on the message before we explicity deadletter the message).
Regarding abandoning the message- just updated the other bug on this.

@manikrish manikrish was assigned
@manikrish manikrish closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.