I am following on a possible upgrade of azure function runtime from v3 to v4 with dotnet. While doing so, I am testing out the isolated option for the project. However I am unable to get message metadata such as DequeueCount, MessageId etc in the queue trigger.
Previously with in-process option, I used to bind CloudQueueMessage but that doesn't seem to work in the isolated mode. Doing so, throws and error -
Cannot convert input parameter 'myQueueItem' to type 'Microsoft.WindowsAzure.Storage.Queue.CloudQueueMessage' from type 'System.String'
This was my isolated queue function binding
[Function("TestApp")]
public void Run([QueueTrigger("sample-queue", Connection = "")] CloudQueueMessage myQueueItem, FunctionContext context)
After looking for a while, I think here it says that, in isolated process we can only bind string. Simple JSON - Object also works.

Is there any way to get these message metadata (members of the CloudQueueMessage) in the isolated azure function?
Thanks.
For DequeueCount property I use this:
[Function("MyQueueTrigger")]
public void Run([QueueTrigger("my-queue-name")] string myQueueItem, int dequeueCount)
{
_logger.LogInformation("Queue item: {item}. Dequeue count: {dequeueCount}.", myQueueItem, dequeueCount);
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With