Azure / Azure/Azure-Functions

dequeueCount parameter not populated with correct value in compiled C# function.

Open
#676 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
PowerShell
Stars
1.1k
Forks
215
Avg merge
4h 2m
Merged PRs (30d)
1

Description

Trying to get the correct dequeueCount for a queue message from compiled QueueTrigger function.

```
public static class SnowflakeLoader
{
[FunctionName("SnowflakeLoader")]
public static async Task Run(
[QueueTrigger("snowflake-data-load",
Connection = "SnowflakeProcessing")]
SnowflakeLoadMessage message,
DateTimeOffset expirationTime,
DateTimeOffset insertionTime,
DateTimeOffset nextVisibleTime,
string queueTrigger,
string id,
string popReceipt,
int dequeueCount,
TraceWriter log)
{
log.Info($"C# Queue trigger function processed:" +
$"queueTrigger={queueTrigger}\n" +
$"expirationTime={expirationTime}\n" +
$"insertionTime={insertionTime}\n" +
$"nextVisibleTime={nextVisibleTime}\n" +
$"id={id}\n" +
$"popReceipt={popReceipt}\n" +
$"dequeueCount={dequeueCount}");
}
}
```

All properties are populated with valid values by the function runtime, except dequeueCount which comes back as zero always.

```
Parameter
--
message | {"TrackingId":"bcb05577-dc74-488f-bcc9-0aa30cd5696b","Table":"D_Foo","Path":"1234/567/789/"}
expirationTime | 2/6/2018 5:12:00 PM +00:00
insertionTime | 1/30/2018 5:12:00 PM +00:00
nextVisibleTime | 1/30/2018 5:27:25 PM +00:00
queueTrigger | {"TrackingId":"bcb05577-dc74-488f-bcc9-0aa30cd5696b","Table":"D_Foo","Path":"1234/567/789/"}
id | 999e177d-02f0-4b74-a769-5c2be00f3e94
popReceipt | AgAAAAMAAAAAAAAARVyBmO+Z0wE=
dequeueCount | 0
log |  
```

Functions Runtime version: 1.0.11510.0 (~1)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the C# QueueTrigger binding behavior in Functions Runtime version 1.0.11510.0 (~1), using the provided SnowflakeLoader function as the reproduction. Verify how dequeueCount is populated for compiled QueueTrigger functions and compare it with the other queue metadata; done means it reports the message's actual dequeue count rather than always returning zero.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
backend, cloud
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.