I have an Azure Web Job which is working by processing new items on an Azure storage queue. That is working. I have set the MaxDequeueCount to a low number, and once an operation triggered by a queue has failed that many times, I expect that this item on the queue to be moved to a poison queue.
However, that is not happening. The item gets removed from the queue, and there is no poison queue nor this message in any poison queue. What is wrong here, as I am unaware of any other steps required in order to have the message "pushed" to a poison queue.
public static async Task ProcessQueueMessage([QueueTrigger("myQueue")] CloudQueueMessage message, TextWriter log)
{
try
{
throw new InvalidCastException();
}
catch (Exception exception)
{
log.WriteLine($"Exception in ProcessQueueMessage: {exception}");
throw;
}
}
throw
at the end of the line. Without scrolling the code window, it's impossible to see it (yet you seem upset that people aren't looking "carefully" for something that's not obvious at all). And you've had to make several comments about this, including a comment on the posted answer. (fyi I edited this to be properly formatted) – David Makogon