Skip to content Skip to sidebar Skip to footer

Mongo Operations Getting Starved

Mongo db operations are getting starved in a rabbit mq consumer . rabbitConn.createChannel(function(err, channel) { channel.consume(q.queue, async function(msg) { // The consum

Solution 1:

Based on the description of the problem, I think you have a case of no message queuing happening. This can happen when you have a bunch of messages sitting in the queue, then subscribe a consumer with auto-ack set to true and no prefetch count. This answer describes in a bit more detail what happens in this case.

If I had to guess, I'd say the javascript code is spending all of its allocated cycles downloading messages from the broker rather than processing them into Mongo. Adding a prefetch count, while simultaneously disabling auto-ack may solve your issue.

Post a Comment for "Mongo Operations Getting Starved"