It seems to be a problem with the internal message queue of Azure SDK.
If I try to send 2 consecutive message to Azure and the the second is sent before the first one is not yet processed, the system crashes.
A similar thing appens if the connection is lost and the messages are queued and then processed when the system is connected again.
In the logs below the two cases are reported.
Code to reproduce this issue
Basically it is the same code in the iothub_client_sample_mqtt. The only difference is that when "messageTrackingId" reaches 5, two consecutive messages are sent.
Environment
Problem Description
It seems to be a problem with the internal message queue of Azure SDK. If I try to send 2 consecutive message to Azure and the the second is sent before the first one is not yet processed, the system crashes. A similar thing appens if the connection is lost and the messages are queued and then processed when the system is connected again.
In the logs below the two cases are reported.
Code to reproduce this issue
Basically it is the same code in the iothub_client_sample_mqtt. The only difference is that when "messageTrackingId" reaches 5, two consecutive messages are sent.
Debug Logs
SCENARIO 1 - CONSECUTIVE MESSAGES
SCENARIO 2 - QUEUED MESSAGES AFTER RECONNECTION