Azure / Azure/azure-functions-host

[Custom Handlers] Differing timestamp formats between Service Bus triggers with cardinality of one vs many

Open
#6,997 0 comments 0 reactions 2 assignees Claimed by @yojagad View on GitHub
httpWorker
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

`EnqueuedTimeUtc` and `ExpiresAtUtc` when cardinality is `one`:

Screen Shot 2020-12-17 at 8 35 12 PM

vs `EnqueuedTimeUtc` and `ExpiresAtUtc` when cardinality is `many`:

Screen Shot 2020-12-17 at 8 38 18 PM

#### Investigative information

Please provide the following:

- Timestamp: 2020-12-18 02:01:35.8498946
- Function App version: 3.0.14916.0
- Invocation ID: 0dfafcf9-ecb5-4059-88e9-545a663670cb (cardinality `one`) vs 97593e8b-2c6b-4114-a660-e30dd70a8c41 (cardinality `many`)
- Region: Central US

#### Repro steps

Create a custom handler function with a Service Bus trigger that has cardinality set to `one`.

#### Expected behavior

The `EnqueuedTimeUtc` and `ExpiresAtUtc` metadata fields are valid RFC 3339 timestamps.

#### Actual behavior

Parsing these values in Golang:

```
t, err := time.Parse(time.RFC3339, enqueuedTimeUtc)
```

fails with:

Screen Shot 2020-12-17 at 8 30 58 PM

#### Known workarounds

Append "Z" to the timestamps before calling `time.Parse`.

#### Related information

function.json:

```
{
"bindings": [
{
"name": "messages",
"type": "serviceBusTrigger",
"direction": "in",
"queueName": "%MY_QUEUE%",
"connection": "MY_QUEUE_CONNECTION_STRING",
"cardinality": "one",
"dataType": "binary"
}
]
}
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.