emqtt icon indicating copy to clipboard operation
emqtt copied to clipboard

Unexpected PUBACK packet received

Open emqplus opened this issue 5 years ago • 1 comments

=ERROR REPORT==== 12-Jul-2019::11:49:17.754315 ===
emqtt(emqs-MacBook-Pro_bench_pub_1_2835554768): State: connected, Unexpected Event: (cast, {mqtt_packet,
                                                                                            {mqtt_packet_header,
                                                                                             5,
                                                                                             false,
                                                                                             0,
                                                                                             false},
                                                                                            {mqtt_packet_puback,
                                                                                             18024,
                                                                                             147,
                                                                                             #{}},
                                                                                            undefined})


=ERROR REPORT==== 12-Jul-2019::12:10:49.543783 ===
emqtt(emqs-MacBook-Pro_bench_pub_1_2641837960): State: connected, Unexpected Event: (cast, {mqtt_packet,
                                                                                            {mqtt_packet_header,
                                                                                             5,
                                                                                             false,
                                                                                             0,
                                                                                             false},
                                                                                            {mqtt_packet_puback,
                                                                                             5076,
                                                                                             147,
                                                                                             #{}},
                                                                                            undefined})

emqplus avatar Jul 12 '19 06:07 emqplus

It is trivial to reproduce by specifying protocol v5 instead of v4: This works: { ok, C } = emqtt:start_link( [ {proto_ver, v4} ] ), { ok, _ } = emqtt:connect( C ), { ok, _ } = emqtt:publish( C, <<"TopicA">>, <<"msg 1">>, 2 ), receive { puback, _ } -> ok end, ok = emqtt:disconnect( C ).

This does not, and it creates the posted error message: { ok, C } = emqtt:start_link( [ {proto_ver, v5} ] ), { ok, _ } = emqtt:connect( C ), { ok, _ } = emqtt:publish( C, <<"TopicA">>, <<"msg 1">>, 2 ), receive { puback, _ } -> ok end, ok = emqtt:disconnect( C ).

EMQX 4.0 beta, OTP 21.2 and OTP 22.0, 64-bit Windows 10.

red-jade avatar Oct 07 '19 14:10 red-jade