Replies: 2 comments 4 replies
-
I will convert this issue to a GitHub discussion. Currently GitHub will automatically close and lock the issue even though your question will be transferred and responded to elsewhere. This is to let you know that we do not intend to ignore this but this is how the current GitHub conversion mechanism makes it seem for the users :( |
Beta Was this translation helpful? Give feedback.
-
@nulian I'm afraid I don't understand what your expectations, in particular
In general, consumers in RabbitMQ clients do not close channels when they run into an unhandled exception. Java client behaved this In addition it matters if the consumer was shut down cleanly or terminated abnormally. In case of a clean shutdown Erlang (and Elixir by proxy) allows you to link two processes so that they go down together. Libraries such as the RabbitMQ AMQP 0-9-1 client or this Elixir façade to it really should not be too opinionated because usually it is easy enough for your |
Beta Was this translation helpful? Give feedback.
-
I know you need to close channels yourself but the direct consumer says that if the case isn't handled it should close the channel. But the exit message of the direct_consumer causes the channel genserver to go down but it doesn't actually close the channel which causes when you open a new channel the error below.
11:06:31.022 [warn] Connection (#PID<0.289.0>) closing: received hard error {:"connection.close", 504, "CHANNEL_ERROR - second 'channel.open' seen", 20, 10} from server
The example case is written in elixir and using the wrapper amqp. But I also tried the erlang amqp_direct_consumer directly and it gave precisely the same error.
Made this issue here because I think it's a bug in the amqp_client package.
Original elixir package ticket: pma/amqp#186
Repro case is using this package and the below calls.
https://github.com/nulian/rabbit_test
You could replace line 12 in channel_opener.ex with next line for the erlang amqp_client version.
{:ok, channel} = AMQP.Channel.open(conn, {:amqp_direct_consumer, [self()]})
Beta Was this translation helpful? Give feedback.
All reactions