You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
As described in issue amqp-node/amqplib#649 of the amqplib, channels with no 'error' listeners attached, cause the whole connection to crash. When using amqp-connection-manager this behavior leads to a reconnect of all open channels when one of them is closed with an error. This may cause some issues, such as slower queue processing or message duplication, depending on circumstances.
However, if 'error' listener is attached to a channel, it will not kill the connection, and channel will not reconnect by itself. This causes all further attempts to interact with that channel to fail or hang indefinitely. All published messages are collected in an internal queue possibly causing a memory leak.
Channel error: Channel closed by server: 404 (NOT-FOUND) with message "NOT_FOUND - no exchange 'nonexistent' in vhost '/'"
After which process will wait for publish promise forever.
I was also unable to find a way to manually reconnect a channel without reconnecting the whole connection, which will affect all other channels used by app.
In my opinion, reconnecting one channel in case of errors, without affecting the whole connection, would be a great feature. Hope for some discussion here.
Thank you.
The text was updated successfully, but these errors were encountered:
Hi!
As described in issue amqp-node/amqplib#649 of the
amqplib
, channels with no 'error' listeners attached, cause the whole connection to crash. When usingamqp-connection-manager
this behavior leads to a reconnect of all open channels when one of them is closed with an error. This may cause some issues, such as slower queue processing or message duplication, depending on circumstances.However, if 'error' listener is attached to a channel, it will not kill the connection, and channel will not reconnect by itself. This causes all further attempts to interact with that channel to fail or hang indefinitely. All published messages are collected in an internal queue possibly causing a memory leak.
Code snippet to reproduce the behavior:
Running this will produce:
After which process will wait for publish promise forever.
I was also unable to find a way to manually reconnect a channel without reconnecting the whole connection, which will affect all other channels used by app.
In my opinion, reconnecting one channel in case of errors, without affecting the whole connection, would be a great feature. Hope for some discussion here.
Thank you.
The text was updated successfully, but these errors were encountered: