0

We're using Azure Message Queues + Azure functions to handle 3rd party webhook callbacks. When the callback fails for some reason we return the message to the queue by throwing an exception in the Azure functions. This seems to work reasonably well.

However, we have a business requirement that asks that we set the timeout based on nr. of attempted retires. I.e first retry after 10 seconds, second retry after 10 minutes from the first etc. Is there a way to modify an existing messages visibilitytimeout from an Azure C# function before throwing to make it go back to the queue?

We also considered handling the message and pushing another one onto the queue as an output of the Azure function but then the DequeueCount is set to 0 again and there's no way of knowing how many retries we've already had. We'd rather not actually add the retry count to the message body if possible.

Joonas Trussmann
  • 1,064
  • 13
  • 22
  • Maybe related https://stackoverflow.com/questions/26937782/queuetrigger-attribute-visibility-timeout – Hackerman Dec 04 '17 at 17:38
  • _"we have a business requirement that asks that we set the timeout based on nr. of attempted retires. I.e first retry after 10 seconds, second retry after 10 minutes from the first etc"_ - have you considered [implementing your own Retry policy?](https://learn.microsoft.com/en-us/dotnet/api/microsoft.windowsazure.storage.retrypolicies.iretrypolicy?view=azure-dotnet) – stuartd Dec 04 '17 at 17:48

0 Answers0