Azure Functions
An Azure service that provides an event-driven serverless compute platform.
5,177 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi
From a Queue triggered Function is it possible to access the MaxDequeueCount property of the queue? I want to manually handle the poison queue process so I need to know the MaxDequeueCount to do this.
Many thanks
Paul
@PAUL FALLOWS While I don't think there is a direct way of getting this information via a binding or through dependency injection, the host.json
file is present right alongside your function app when deployed, so there is nothing stopping you from doing something like this 😅
string json = File.ReadAllText("./host.json");
var hostJson = ObjectSerializer.Deserialize<JsonNode>(json);
var maxDequeueCount = hostJson["extensions"]["queues"]["maxDequeueCount"];