You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
EventHub Binding does not resolve Event Custom Properties in case cardinality "one" and EventMessage contains a properties field on the first level
#390
Open
TobiScw opened this issue
Apr 23, 2021
· 1 comment
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.
The text was updated successfully, but these errors were encountered:
I'm cleaning up GitHub issues and confirmed this still repros for me in model v4. My guess is there's nothing we can do about this on the Node.js side - the issue is probably upstream from us
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.
The text was updated successfully, but these errors were encountered: