The Azure Service Bus Queue triggered function would perform a default policy for sending message into the dead letter queue if message is poisoned. However, is there anyway that we could manually send the message to dead letter queue? There are couple of times that we wouldn't want Azure Function to perform its default policy due to some kind of internal or business exception, we would like to bind additional information to our message and manually send it to our Azure Service Bus Deadletter Queue.
In a previous version where it's using BrokeredMessage object, there is a method called
BrokeredMessage msg;
msg.DeadLetter();
However, in the most recent Functino 2.X, where it's using the Message object, that doesn't have this method somehow...