toyokazu / fluent-plugin-mqtt-io

Fluent plugin for MQTT Input/Output
Apache License 2.0
17 stars 12 forks source link

Fluentd crashed with exception when receiving unknown PUBACK packets #27

Open hanicornelia opened 8 months ago

hanicornelia commented 8 months ago

Fluentd encountered an exception upon receiving unfamiliar PUBACK packets, leading to disconnection from the broker. It fails to reconnect unless Fluentd is restarted. Fluentd should address this issue by automatically re-establishing the connection to the broker following the occurrence of the exception.

/usr/lib/ruby/gems/3.1.0/gems/mqtt-0.6.0/lib/mqtt/client.rb:499:in `block in handle_packet': undefined method `<<' for nil:NilClass (NoMethodError)

          @pubacks[packet.id] << packet
                              ^^
        from /usr/lib/ruby/gems/3.1.0/gems/mqtt-0.6.0/lib/mqtt/client.rb:498:in `synchronize'
        from /usr/lib/ruby/gems/3.1.0/gems/mqtt-0.6.0/lib/mqtt/client.rb:498:in `handle_packet'
        from /usr/lib/ruby/gems/3.1.0/gems/mqtt-0.6.0/lib/mqtt/client.rb:472:in `receive_packet'
        from /usr/lib/ruby/gems/3.1.0/gems/mqtt-0.6.0/lib/mqtt/client.rb:278:in `block in connect'