Iot Edge offline capabilities

ambharesh venkatraman 61 Reputation points
2021-03-24T10:01:20.097+00:00

I have a scenario where data comes from a module and i send it to IOT Hub in another module. When internet is not working the messages are stored in a queue by a in built azure function. I want to store these data locally so that if my system crashes these data does not vanish.

When there is no internet the interpreter is not coming out of the function send_message_to_output() since its waiting for a Ack from the cloud , which won't happen until the network is back.

Is there any function I can use to store these data locally even when there is no internet or is there any work around for this?

Azure IoT
Azure IoT
A category of Azure services for internet of things devices.
399 questions
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.
573 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,189 questions
{count} votes

Accepted answer
  1. Sander van de Velde | MVP 32,641 Reputation points MVP
    2021-03-24T19:02:30.507+00:00

    Hello @ambharesh venkatraman ,

    as mentioned above, offline support is already built-in into Azure IoT Edge.

    Messages are persisted on disk until the internet connection comes back.

    The location the messages are stored is adjustable as seen in here.

    This is also part of ruggedizing your edge device.

    Give both the edgeHub and edgeAgent access to a folder using an Environment variable and Container Create options.

    In Linux, this an example for both modules:

       {  
         "HostConfig": {  
           "Binds": [  
             "/etc/iotedge/storage/:/iotedge/storage/"  
           ]  
         }  
       }  
    

    (merge this with the already existing edgeHub container create options)

    and the environment variable: storageFolder = /iotedge/storage/

    Make sure the folder "etc/iotedge/storage" exists on disk and has enough access rights.

    There are extra capabilities like priority messages and TTL on the edge routing configuration also.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.