Actually, there is no public endpoint for customer send feedback for C2D message. We can only change the state of message and Azure IoT hub will send the feedback to the feedback endpoint which used for the service-side to receive the feedback based on the state of message. Here is a helpful document to understand Message feedback.
I'm trying to send feedback for a message to IOT Hub, my problem is
only http endpoints are working for me, no other protocols are
supported,
If you use azure iot sdk, there is an API: deviceClient.CompleteAsync()
to notifies IoT Hub that the message has been successfully processed. The message can be safely removed from the device queue.
As well as:
AbandonAsync()
: to notifies IoT Hub puts a received message back onto the device queue
RejectAsync()
: to notifies IoT Hub deletes a received message from the device queue and indicates to the server that the message could not be processed.
You can reference DeviceClientHttpSample.
also not able to read the header to get the etag sending by the IOT
Hub in cloud-to-device message.
REST api can read etag.
Receive a C2D message(Receive Device Bound Notification):
GET https://<fully-qualified IoT hub domain name>/devices/device1/messages/deviceBound?api-version=2016-11-14
From response header you can get etag:
Send a feedback using etag retrieved above(Complete Device Bound Notification):