rebus-org / Rebus.AzureServiceBus

:bus: Azure Service Bus transport for Rebus
https://mookid.dk/category/rebus
Other
33 stars 20 forks source link

Error counter #47

Closed MarcoGix closed 4 years ago

MarcoGix commented 4 years ago

Hi!

We have an issue when an error occurs on consumer side: we saw that the process tracks the error count only InMemory (InMemErrorTracker on Rebus) so when a process runs on a single machine or a cluster and the process crush, the errors count goes lost. In this way, using the AzureServiceBus, we are trying to retry to process that message up to MAX (that we saw is 100) instead of stopping after few attempts.

Do you accept a PR in which we put the MaxDeliveryCount property settable from outside so we can change it? in this way we can go in dead letter and stop retrying to process that message.

mookid8000 commented 4 years ago

Aren't you looking for this setting in Rebus:

Configure.With(...)
    .Options(b => b.SimpleRetryStrategy(maxDeliveryAttempts: 10))
    .(...)

?