I have several Azure Functions with Queue Triggers. In Version 2
public static void Run(string message, ICollector<string> output, ILogger log) {
try { DoMyFunction(message, output, log); }
catch { // HOWTO: Tell Queue Not to Bother Retrying }
}
All onwards Queues are as output collections.
Given a Message that is not supported
When then message is processed by my function
Then my function should return a status that ensures the message is not retried
I am assuming that an HTTP 400 Bad Request is what we're after - therefore I'm looking for the equivalent of
public static HttpStatusCode Run(string message, ICollector<string> output, ILogger log)
{
try {
DoMyFunction(message, output, log);
return HttpStatusCode.OK;
}
catch { return HttpStatusCode.BadRequest; }
}