Understanding IoT Hub Message Size Limits

David Maryo 116 Reputation points
2024-04-03T15:46:51.3866667+00:00

Hello,

I'm trying to wrap my head around IoT Hub message size limits and how they actually impact our setup.

Here's the setup we have, we've got a bunch of IoT Hubs running under the Standard Tier. They're like middlemen for messages coming from IoT Edge Modules, specifically OPCPublisher. These modules connect to KepServer, where we configure tags, creating a flow of data.

Now, the docs say that IoT Hub's max message size is 64 KB. But what does that really mean in plain terms? Can someone break it down with a simple example? Let's say we have some IoT Edge Modules sending data to the IoT Hub. How does this 64 KB limit affect how data moves and gets processed in our system?

I'd appreciate any examples or explanations that could shed some light on this.

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.
576 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,203 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Sander van de Velde | MVP 33,141 Reputation points MVP
    2024-04-03T17:43:41.13+00:00

    Hello @David Maryo ,

    welcome to this moderated Azure community forum.

    The Azure IoT Hub ingests messages having a body, application properties and system properties, with a maximum size of 256KB for each incoming message. (You mention 65KB. Do you have a link for that?)

    Device messages can even be batched until you read a size of 265KB so these are sent as one incoming message. The IoT Hub is then smart enough to split them into individual messages before routing them to other Azure services.

    So, an IoT Hub message could contain one or more device messages.

    The IoT Hub count in 4KB 'chunks' of an incoming message. An incoming message with a size less than 4KB is counted as one chunk. An incoming message with a size of 6KB is counted as two chunks.

    So sending extremely large messages burns you faster through the daily supported amount of messages (aka chunks) (400.000 for a S1 with 1 unit).

    The Azure IoT Edge edge hub module is responsible for sending messages to the IoT Hub. It has some mechanisms for batching in place already (see MaxUpstreamBatchSize) to communicate in a smarter way.

    If you interested in the details, check out this blog post about stretching the IoT Edge performance limits.

    I hope this makes it a bit easier to understand how the Azure IoT Hub works with messages and chunks.


    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.

    0 comments No comments

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.