We’re experiencing intermittent failures with the app enablement SDK in aziot-25 when using async callback patterns for telemetry processing. Our device fleet sends high-frequency sensor data, and about 15-20% of async method calls fail silently without triggering registered callbacks. We’ve verified callback registration is correct, but the SDK seems to drop responses unpredictably.
Here’s our callback setup:
await client.RegisterCallbackAsync("telemetry", OnTelemetryReceived);
await client.SendTelemetryAsync(payload);
// Callback never fires for some messages
The issue causes significant telemetry loss in our analytics pipeline. Has anyone encountered similar SDK async pattern issues? We need guidance on proper callback registration and enabling verbose logging to diagnose this.
This sounds like a threading issue with the SDK’s internal callback queue. In high-volume scenarios, the callback dispatcher can get overwhelmed. Have you checked the SDK’s internal queue size settings? There’s a configuration parameter for max pending callbacks that defaults to 100. If you’re exceeding that, callbacks get dropped. Also, make sure you’re not blocking in your callback handler - keep it lightweight and offload heavy processing to a separate task queue.
I’ve seen this before. The async callback pattern in aziot-25 SDK has some quirks with high-frequency operations. First thing to check is whether you’re awaiting the registration properly before sending telemetry. Also, are you handling exceptions in your callback handler? Silent failures often happen when the callback throws and isn’t caught. Try wrapping your OnTelemetryReceived method in a try-catch block and log any exceptions that occur.
For verbose logging, enable diagnostic tracing in the SDK initialization. Set the logging level to Debug and configure a trace listener. This will show you exactly what’s happening with callback registration and execution. You’ll see entries for callback queuing, dispatch attempts, and any internal errors. The logs should reveal whether callbacks are being dropped due to queue overflow or timeout issues. Also check if your connection is stable - intermittent network issues can cause callback delivery failures.