Skip to content

EventHub Binding does not resolve Event Custom Properties in case cardinality "one" and EventMessage contains a properties field on the first level #390

@TobiScw

Description

@TobiScw

Investigative information

It seems like the EventHub binding cannot correctly parse the Custom Properties of an Event if the message body contains a "properties" object.

Message that is send in the ServiceBusExplorer
image

Function that recieves the message with wrongly set context.bindingData.properties that are filled in from the Message Body
image

This only happens if the cardinality is set to "one". in the case of "Cardinality": "many" the context.bindingData.properties is replaced with context.bindingData.propertiesArray and are filled correctly from the Custom Properties Field

Repro steps

Create an EventHub message with Custom Properties that contains a properties object inside the message. Additionally set Cardinality in the function.json to "one"

Expected behavior

Message send with renamed message property properties to prop.
image

context.bindingData.properties are set correctly
image

Context

The issue there is, the field properties in the Message cannot be changed, because the message is created by the IoT Hub Message Routing. Therefore changing the body is not trivial.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions