Open matomesc opened 10 years ago
I'm not sure if this is the issue, but .shift()
on a queue will ack
the last received message. Maybe prefetch count is screwing that up and acknowledging the last received message 5 times? Unknown delivery tag tends to indicate you've acknowledged a message more than once.
Instead of q.shift()
, i just did ack.acknowledge()
which solved the problem. What exactly is the point of .shift()
?
q.shift()
is a terrible idea. combined with prefetchCount
it's a bad bad combo. should be deprecated, shout warnings on use and be removed pronto.
Versions used: node-amqp@0.2.0, node.js@0.10.25 and RabbitMQ@3.3.4.
I have a consumer that is supposed to pull 5 messages off a queue, process and ack them. It looks like:
When i start running the consumer, i'm getting a bunch of the following errors on the
q.shift()
:Also i'm also seeing the following errors randomly but with various tags (5, 7, 9, 21, 40) and identical stacks:
Any idea about what's going on here?