Hi @Martti Käärik I have looked into this issue further and discovered that the Azure IoT Hub and Event grid can accept larger messages from the devices. The default configuration used by the protocol for MaxInboundMessageSize is set to 256 KB. This is the Maximum message size allowed for publishing from a device to the gateway. If a device publishes a bigger message, the protocol gateway will close the connection.
This is within the limits of the Max message size supported by IoT Hub and Event Grid through MQTT support. The maximum message sizing limits for IoT Hub and Event grid are 256Kb and 512Kb respectively. So, your message of ~195Kb should not be a concern here.
Could it be that IoT Hub measures message size with the meta-data (and not just message body)
To your question, there is some additional metadata send along with the message body such as connection ID, message ID, time stamp which would comprise to the message size in addition to the actual telemetry.
Based on the trigger you are using in binding your Azure Event grid to Azure function, it might be possible that there is a limitation to the maximum event data size
which drives the Azure function to trigger. I could not find any explicit limitation in the documentation around this.
For a deeper investigation and on this issue, could you please send an email with the below details, so that we can work closely on this matter.
Thread URL: Link to this thread.
Azure Subscription ID:
Email Subject : Attn Leela