Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PubAck: [PacketIdentifier=1131] [ReasonCode=] at an unexpected time.) #970

Closed
meroktm opened this issue Aug 5, 2020 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@meroktm
Copy link

meroktm commented Aug 5, 2020

Hi Guys,

We have been using version 3.0.8 of MQTTnet in our microservices to pub/sub which is picked up by other microservices all together we have 10 services, recently we have been getting the error listed below which is sending our microservices into fatal mode and making it restart. This create a huge backlog in processing the messages and have a dominos effect in other services to go into fatal mode and restart again and again. It has created a huge performance impact in our production system, any help will be greatly appreciated with this.

Condition for our messages.

  • publishing with QOS 1
  • average incoming message 2000/min per container
  • using AWS AmazonMQ broker

Once the container restart it will produce and error below.

{ "Depth": 0, "ClassName": "System.AggregateException", "Message": "One or more errors occurred. (Received packet 'PubAck: [PacketIdentifier=1131] [ReasonCode=]' at an unexpected time.)", "Source": "System.Private.CoreLib", "StackTraceString": " at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)\n at LMS.Service.Broker.Mqtt.MqttServiceBrokerSend.MQTTPublish(String topic, Byte[] payload)\n at LMS.MTD.Decoder.Services.MTDSender.SendMessage(ServiceBrokerMessage mtdDecoder) in /src/LMS.MTD.Decoder/Services/MTDSender.cs:line 97", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "HResult": -2146233088, "HelpURL": null }, { "Depth": 1, "ClassName": "MQTTnet.Exceptions.MqttProtocolViolationException", "Message": "Received packet 'PubAck: [PacketIdentifier=1131] [ReasonCode=]' at an unexpected time.", "Source": "MQTTnet", "StackTraceString": " at MQTTnet.PacketDispatcher.MqttPacketDispatcher.Dispatch(MqttBasePacket packet)\n at MQTTnet.Client.MqttClient.TryProcessReceivedPacketAsync(MqttBasePacket packet, CancellationToken cancellationToken)\n at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout)\n at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken)\n at MQTTnet.Client.MqttClient.PublishAtLeastOnceAsync(MqttPublishPacket publishPacket, CancellationToken cancellationToken)\n at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout)\n at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken)\n at MQTTnet.Client.MqttClient.PublishAtLeastOnceAsync(MqttPublishPacket publishPacket, CancellationToken cancellationToken)\n at MQTTnet.PacketDispatcher.MqttPacketAwaiter1.WaitOneAsync(TimeSpan timeout)\n at MQTTnet.Client.MqttClient.SendAndReceiveAsync[TResponsePacket](MqttBasePacket requestPacket, CancellationToken cancellationToken)\n at MQTTnet.Client.MqttClient.PublishAtLeastOnceAsync(MqttPublishPacket publishPacket, CancellationToken cancellationToken)", "RemoteStackTraceString": null, "RemoteStackIndex": 0, "HResult": -2146233088, "HelpURL": null }`

Thanks,
Kish

@meroktm meroktm added the bug Something isn't working label Aug 5, 2020
@meroktm
Copy link
Author

meroktm commented Aug 17, 2020

Hi guys we are having some huge performance impact with these error as it timeout and our timeout value is around 3 secs. We are also using using single client to publish messages will this impact in anyway. Any example provide to push through the loads of data will be great to compare.
Thanks again

@chkr1011
Copy link
Collaborator

Please try latest version. We fixed some things in that area. If the issue still exists please reopen the ticket.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants