-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Missing systemProperties when consuming messages from IoTHub #7801
Comments
@chradek can you please look into this? Seems like we have an opportunity to better document for contributions too. |
@seank-com, Apologies for the delay in responding
Can you elaborate on how you do this so that we can try and repro this? |
I've updated the repo steps with more information about creating routes. |
Thanks @seank-com
Do you mean the final contents in the storage blob? @serkantkaraca, |
@ramya-rao-a yes. See the code here for the complete set of properties - https://github.com/Azure/azure-sdk-for-net/blob/1264615ef858e1c368e1ba2b89771fdb1be69428/sdk/eventhub/Microsoft.Azure.EventHubs/src/Amqp/AmqpMessageConverter.cs#L219 |
Thanks @serkantkaraca @chradek Let's have the changes @serkantkaraca has pointed above in the upcoming April update |
Another reference to the missing properties based on the spec from AMQP can be found in section 3.2.4 in http://www.amqp.org/sites/amqp.org/files/amqp.pdf |
@ramya-rao-a , yes after the messages land dump the contents of the json blob from the storage container. You can download it from the containers blade of the storage account in the portal. |
Please let us know if you still encounter any issues after upgrading the Event Hubs SDK. |
Verified! Thanks for the quick turn-around. |
@azure/event-hubs
5.0.0
Linux in a node:alpine Docker container
Describe the bug
When I configure routes on my IoTHub to put messages storage, they land looking like this:
When I instead consume them using this library, they look like this
As you can see,
messageId
,correlationId
&contentType
are all missing.To Reproduce
Steps to reproduce the behavior:
goto portal and create an IoTHub and a storage account
goto Message routing blade and select Custom endpoints tab and add a Storage route
a. Name: storage
b. link it to a container named iothub in the storage account you created in step 1
c. select JSON for Encoding
d. File name format: {iothub}/{partition}/{YYYY}/{MM}/{DD}/{HH}/{mm}
goto the Routes tab and create two routes
a. Name: storage Endpoint: storage Data source: Device Telemetry Messages Enable route: Enable Route query: true
b. Name: default Endpoint: events Data source: Device Telemetry Messages Enable route: Enable Route query: true
goto Built-in endpoints blade and create a new consumer group
copy the Event Hub-compatible endpoint and consumer group name
goto the IoT devices blade and create a device
goto to blade for the device and copy the Primary Connection String
Add copied string to environment
Service Side
npm install --save @azure/event-hubs
Client Side
Expected behavior
Expected
element
in service side code above to contain message-id, correlation-id and content-typeAdditional context
I've debugged this a little and it appears the information is lost when the message is converted to an EventDataInternal object. If the following code was added around line 153 of eventData.ts I believe everything would be ok.
I've never worked with Typescript before and there was no information in the README.md or CONTRIBUTING.md on how to build and run unittests, so I don't feel comfortable putting together a PR
The text was updated successfully, but these errors were encountered: