Azure Event Grid: Message field within DateTimeOffset format is converted to date with wrong offset on at consumer level

  Kiến thức lập trình

We are publishing event to Azure Event Grid. Event containse field with datetimeoffset format

timestamp": "2019-07-26T16:59:57-05:00"

The message consumer is azure function with EventGridTrigger

    [Function("Test")]
    public async Task<string> RunAsync([EventGridTrigger] string msg)
    {
        ...
    }

Azure function is been receiving message with incorrect offset

"timestamp": "2019-07-26T23:59:57+02:00"

Axpected result: reseived event timestamp field with date time offset must be equal to published

Actual result: reseived event timestamp field with date time offset has wrong offset (expected -05:00 actual +02:00)

"timestamp": "2019-07-26T23:59:57+02:00"

Rem:

  • we tested events schemes: EventGridSchema and CloudEventSchemaV1_0
  • we tested different bindings: string, CloudEvent, EventGridEvent, JSON serializable type

Rem:

  • at the same time if we redirect data from event grid to service bus the message has correct data.
  • based on this, we can conclude that the problem concerns EventGridTrigger as a part of azure function

New contributor

Vyacheslav Demydenko is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Theme wordpress giá rẻ Theme wordpress giá rẻ Thiết kế website

LEAVE A COMMENT