Skip to content

Unhandled exceptions are logged when closing MQTT or Stream connections via CLI #11985

@mkuratczyk

Description

@mkuratczyk

Describe the bug

mqtt_unexpected_call exception when closing MQTT connection

Reproduction steps

  1. start an MQTT connection (idle consumer in this example)
    omq mqtt -x 0

  2. Close all guest connections
    rabbitmqctl close_all_user_connections guest bye

  3. The connection is closed, but there's an exception in the logs

{mqtt_unexpected_call,{shutdown,<<"bye">>},
                      {<0.1238.0>,#Ref<0.3075749135.3916431361.188844>}}
Client <0.1238.0> stacktrace
[{gen,do_call,4,[{file,"gen.erl"},{line,241}]},
 {gen_server,call,3,[{file,"gen_server.erl"},{line,1122}]},
 {rabbit_networking,close_connection,2,
                    [{file,"rabbit_networking.erl"},{line,521}]},
 {rabbit_networking,'-close_all_user_connections/2-lc$^1/1-1-',2,
                    [{file,"rabbit_networking.erl"},{line,535}]},
 {rabbit_networking,close_all_user_connections,2,
                    [{file,"rabbit_networking.erl"},{line,535}]},
 {erpc,execute_call,4,[{file,"erpc.erl"},{line,1250}]}]

Expected behavior

Connection closed, the fact logged without a stacktrace

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions