Maximize throughput with RabbitMQ

后端 未结 3 1186
小蘑菇
小蘑菇 2021-01-30 01:33

In our project, we want to use the RabbitMQ in \"Task Queues\" pattern to pass data.

On the producer side, we build a few TCP server(in node.js) to recv high concurrent

3条回答
  •  佛祖请我去吃肉
    2021-01-30 02:25

    You will increase the throughput with a larger prefetch count AND at the same time ACK multiple messages (instead of sending ACK for each message) from your consumer.

    But, of course, ACK with multiple flag on (http://www.rabbitmq.com/amqp-0-9-1-reference.html#basic.ack) requires extra logic on your consumer application (http://lists.rabbitmq.com/pipermail/rabbitmq-discuss/2013-August/029600.html). You will have to keep a list of delivery-tags of the messages delivered from the broker, their status (whether your application has handled them or not) and ACK every N-th delivery-tag (NDTAG) when all of the messages with delivery-tag less than or equal to NDTAG have been handled.

提交回复
热议问题