Behaviors of Edge Module response to edgehub after processing a message

Alex Alex 20 Reputation points
2023-10-11T14:49:06.0966667+00:00
  1. Edge Module Register a callback for messages that are received by the module. This callback is invoked by EdgeHub
  2. In this call back function, after processing a message there is a response message back to EdgeHub (For example in case of .NET, MessageResponse.NONE, MessageResponse.COMPLETE, MessageResponse.ABANDONED)
  3. Read in some places like, If module response as ABANDONED, then EdgeHub will retry the message to the same module again after some times.
  4. In some reads, its mentioned as the module "should" always sent COMPLETE - Not sure why?
  5. Question is, What is the exact behaviors of each of these response code ? Is it not recommended to use other than COMPLETE ? Different SDK follow different type of response code, is there a way to decode the exact codes supported by EdgeHub ?
  6. Scenario what we are trying - Our edge module interact with some external system. If the module is not able to make the external interaction successfully, then we would like to use the retry/storage feature supported by EdgeHub
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
548 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 29,931 Reputation points MVP
    2023-10-11T17:01:32.4933333+00:00

    Hello @alex alex ,

    it seems you are referencing any message routes between Azure IoT Edge modules (as opposed to C2D cloud messages).

    Messages between routes are put in queues. If messages are not picked up, these are removed after a certain retention time.

    In this documentation example, you can see both MessageResponse.Abandoned and MessageResponse.Completed in action.

    You can check the queue length using the Metrics collector.

    I checked the code for more details on the response.

    Completed:

    User's image

    Abandoned:

    User's image

    There is also a None version but I could not find additional documentation:

    User's image

    The strategies are not documented.

    Check out this thread for a discussion about the usage of the Abandoned.

    I recommend to connect with the team behind the GitHub repo for more details.


    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful