Skip to content

Error event is emitted due to normal connection close from RabbitMQ side #110

Description

@xaka

Hi there,

I was verifying how service behaves when RabbitMQ gets restarted, etc. and I've got the following:

Error: Connection closed: 320 (CONNECTION-FORCED) with message "CONNECTION_FORCED - broker forced connection closure with reason 'shutdown'"
    at Object.accept (../node_modules/amqplib/lib/connection.js:89:32)
    at Connection.mainAccept [as accept] (../node_modules/amqplib/lib/connection.js:62:33)
    at Socket.go (../node_modules/amqplib/lib/connection.js:459:48)
    at Socket.emit (events.js:92:17)
    at emitReadable_ (_stream_readable.js:426:10)
    at emitReadable (_stream_readable.js:422:5)
    at readableAddChunk (_stream_readable.js:165:9)
    at Socket.Readable.push (_stream_readable.js:127:10)
    at TCP.onread (net.js:528:21)

It was absolutely usual RabbitMQ restart procedure and service crashed because it was expecting to get close event, but not error.

In my opinion there should be no error event when library gets 320 code from RabbitMQ. Even though it's called CONNECTION-FORCED, there is nothing wrong happened.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions