-
Notifications
You must be signed in to change notification settings - Fork 496
Open
Labels
bugSomething isn't working.Something isn't working.
Description
Context
OS: Windows 11 Desktop x64
Application's .NET Target Framework : .NET 8.0 ASP.NET Core application
Device: Laptop
SDK version used: 1.42.3
Description of the issue
We have a problem with "RegisterCommandHandlerAsync" if we send a message with a too large message body before. The process order is this:
- Connect to IoT Hub
- Send a large message -> Exception throws (this is ok)
- Register command handler -> Exception throws (this should not throw)
Console log of the issue
System.InvalidOperationException: Message size (559135 bytes) is too big to process. Maximum allowed payload size is 262143
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttIotHubAdapter.ComposePublishPacketAsync(IChannelHandlerContext context, Message message, QualityOfService qos, String topicName)
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttIotHubAdapter.SendMessageAsync(IChannelHandlerContext context, Message message)
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttIotHubAdapter.WriteAsync(IChannelHandlerContext context, Object data)
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttIotHubAdapter.SubscribeAsync(IChannelHandlerContext context, SubscribePacket packetPassed)
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttIotHubAdapter.WriteAsync(IChannelHandlerContext context, Object data)
at Microsoft.Azure.Devices.Client.Transport.Mqtt.MqttTransportHandler.EnableMethodsAsync(CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.<>c__DisplayClass27_0.<<ExecuteWithErrorHandlingAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.Devices.Client.Transport.ErrorDelegatingHandler.ExecuteWithErrorHandlingAsync[T](Func`1 asyncOperation)
at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.<>c__DisplayClass30_0.<<EnableMethodsAsync>b__0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.Devices.Client.TransientFaultHandling.RetryPolicy.<>c__DisplayClass34_0.<<RunWithRetryAsync>g__TaskWrapper|0>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Azure.Devices.Client.TransientFaultHandling.RetryPolicy.RunWithRetryAsync[T](Func`1 taskFunc, ShouldRetry shouldRetry, Func`2 isTransient, Action`3 onRetrying, Boolean fastFirstRetry, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.TransientFaultHandling.RetryPolicy.RunWithRetryAsync(Func`1 taskFunc, ShouldRetry shouldRetry, Func`2 isTransient, Action`3 onRetrying, Boolean fastFirstRetry, CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.Transport.RetryDelegatingHandler.EnableMethodsAsync(CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.InternalClient.HandleMethodEnableAsync(CancellationToken cancellationToken)
at Microsoft.Azure.Devices.Client.InternalClient.SetMethodHandlerAsync(String methodName, MethodCallback methodHandler, Object userContext, CancellationToken cancellationToken)
at Deos.P126.Cloud.Gate.Infrastructure.Iot.Azure.DigitalTwin.RegisterCommandHandlerAsync[T,TX](String commandName, ICommand`2 command, CancellationToken cancellationToken)
Metadata
Metadata
Assignees
Labels
bugSomething isn't working.Something isn't working.