Open dolftax opened 7 years ago
@postwait :point_up: We are using this package in production. Confirm the behavior and I can send a pull request.
I am seeing this error as well...
Connected to RabbitMQ {}
RabbitMQ connection error { '0': Error: Unmatched field {"name":"consumerTag","domain":"shortstr"}
at Object.serializeFields (/opt/worker-linux/node_modules/amqp/lib/serializer.js:297:19)
at Connection._sendMethod (/opt/worker-linux/node_modules/amqp/lib/connection.js:850:14)
at Object.cb (/opt/worker-linux/node_modules/amqp/lib/queue.js:79:21)
at Queue.Channel._tasksFlush (/opt/worker-linux/node_modules/amqp/lib/channel.js:52:10)
at Queue.Channel._taskPush (/opt/worker-linux/node_modules/amqp/lib/channel.js:42:8)
at Queue.subscribeRaw (/opt/worker-linux/node_modules/amqp/lib/queue.js:61:15)
at Queue._onMethod (/opt/worker-linux/node_modules/amqp/lib/queue.js:447:18)
at Queue.Channel._onChannelMethod (/opt/worker-linux/node_modules/amqp/lib/channel.js:85:12)
at Connection._onMethod (/opt/worker-linux/node_modules/amqp/lib/connection.js:454:28)
at AMQPParser.self.parser.onMethod (/opt/worker-linux/node_modules/amqp/lib/connection.js:136:12) }
RabbitMQ connection error { '0': { Error: read ECONNRESET
at TCP.onread (net.js:602:25) errno: 'ECONNRESET', code: 'ECONNRESET', syscall: 'read' } }
This is node.js version 9.11.1, npm version 5.6.0 and amqp version 0.2.6. Please let me know what additional information you need, if any.
In the meantime, should we downgrade to a lower version of amqp? If so, which one?
The
consumerTag
generation [1] looks good to me. Is it an extremely rare case whereMath.random()
is generating values > 256 characters which violatesshortstr
?Also, post occurrence of this event, the app is not handling any more requests. Should this [2] be caught?
[1] https://github.com/postwait/node-amqp/blob/master/lib/queue.js#L47 [2] https://github.com/postwait/node-amqp/blob/master/lib/serializer.js#L297
I can send a PR if :point_up: is the expected behavior.