I am using Azure Function EventHub trigger. The messages coming to EH are very critical and we don't want to miss any. If while processing message from my Event Hub, something happens, I write to my retryQueue as follows:
try
{
await retryQueue.AddAsync (some data from my hub);
// if this call also fails, it goes to my catch
}
catch (exception e)
{
await retryQueue.AddAsync (my eventData);
// but what if this call also fails?
}
But what happens when AddAsync() call also fails in my catch block? How and where do I save the message for processing later? Is there such thing as IsTransient (which is available in my Service bus queue)?