Code Monkey home page Code Monkey logo

Comments (5)

dcristoloveanu avatar dcristoloveanu commented on July 17, 2024

When receiving the receiver gets the application properties from the AMQP message, so it should be possible to get all the IoTHub properties that are stuck in the application properties from the event data by using EventData_Properties.

IIRC correctly the IoT Hub properties are packaged in the application properties of the AMQP message.

I did not get to try the specific property on the latest master. Once I do I’ll reply here.

from azure-event-hubs-c.

Benjamin118 avatar Benjamin118 commented on July 17, 2024

Hi everyone,

I agree with @AntoineGagne : Iothub client knows the notion of system properties (as MessageId or MessageCorrelationId), not to be confused with user (or custom) properties associated to the message.

With using EventData_Properties, we only have access on user properties, and eventDataHandle doesn't contain system properties (see attached log)

We need these system properties to check full integrity of received message on eventHub.

EventHub_Issue_38_system_properties_missing.log

from azure-event-hubs-c.

alexmrtn avatar alexmrtn commented on July 17, 2024

Hi,

I did some additional instigation and there is indeed a missing piece here. The properties on a received event does not contains the message ID.

I checked in the azure-iot-c-sdk repo, the AMQP transport protocol uses properties_set_message_id function to set on the AMQP message the user-defined message ID of the IOTHUB_MESSAGE_HANDLE. However in this repo the corresponding properties_get_message_id is never used when the AMQP message is transformed to a EVENTDATA_HANDLE.

How can we solve this without having to use a custom property for the message ID ?

Thanks!

from azure-event-hubs-c.

anthonyvercolano avatar anthonyvercolano commented on July 17, 2024

@AntoineGagne
This is from Node, but this is the actual location of the device id.
if (eventData.annotations['iothub-connection-device-id'] === provisionedDevice.deviceId)
@dcristoloveanu & @Benjamin118

from azure-event-hubs-c.

anthonyvercolano avatar anthonyvercolano commented on July 17, 2024

Really using the C SDK to get this isn't the best path. Use something like the azure node event hub sdk which can provide what you need. Probably the C# one does also.

from azure-event-hubs-c.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.