Azure / Azure/azure-functions-nodejs-worker
EventHub Binding does not resolve Event Custom Properties in case cardinality "one" and EventMessage contains a properties field on the first level
- Dominant language
- TypeScript
- Stars
- 110
- Forks
- 51
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 2
Description
#### 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

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

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.

context.bindingData.properties are set correctly

#### 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.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.