Open sebastian-bylinski opened 7 months ago
Thanks for the info.
For preview release, please update to the last good version: https://github.com/Azure/azure-iot-sdk-csharp/releases/tag/preview_2023-08-14
For production stable setup, please use the latest version of the official SDK release here: https://github.com/Azure/azure-iot-sdk-csharp/releases/tag/2024-03-28
Andy,
I tried 2.0.0-preview007 with the same exact results. It seems that the success of getting messages from the IoT hub increased, however messages are still lost when connecting to the hub for the very first time.
Sebastian Bylinski
On Tue, Apr 16, 2024 at 12:52 PM Andy @.***> wrote:
Thanks for the info.
For preview release, please update to the last good version:
https://github.com/Azure/azure-iot-sdk-csharp/releases/tag/preview_2023-08-14
For production stable setup, please use the latest version of the official SDK release here: https://github.com/Azure/azure-iot-sdk-csharp/releases/tag/2024-03-28
— Reply to this email directly, view it on GitHub https://github.com/Azure/azure-iot-sdk-csharp/issues/3449#issuecomment-2059530394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AEFAG3USCNGMGRTQH3EJFNTY5VJM3AVCNFSM6AAAAABFZTS5MCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANJZGUZTAMZZGQ . You are receiving this because you authored the thread.Message ID: @.***>
Context
Description of the issue
Using 2.0.0-preview004 in GWv2 gateway, call to OpenAsync to IotHub wipes message from IoTHub for the first time when connecting when device is offline before message has been send to IoTHub. It happens at random. Sometimes getting the message in the code, sometimes not. Out of 10 tries 3, worked 7 did not. Apparently this issue supposed to be corrected in GWV2, but it is not. The issue remains. It works fine when device is already connected to IoTHub when message has been sent.
Code sample exhibiting the issue
private static IotHubDeviceClient _iotHubClient;
try { var _connectionString = "HostName=;SharedAccessKeyName=device;SharedAccessKey=;Deviceid=";
}
protected async Task MessageCallback(IncomingMessage message)
{
return MessageAcknowledgement.Abandon;
}
Console log of the issue