Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Comments

@TobiScw
Copy link

TobiScw commented Apr 23, 2021

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.

@ejizba
Copy link
Contributor

ejizba commented Oct 11, 2023

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants