RabbitMQ: fast producer and slow consumer

前端 未结 5 1541
余生分开走
余生分开走 2021-02-01 06:31

I have an application that uses RabbitMQ as the message queue to send/receive message between two components: sender and receiver. The sender sends message in a very fast way. T

5条回答
  •  情书的邮戳
    2021-02-01 06:52

    As answer I suggest: both.

    You can take advantage from having multiple receiver, as well as setting up each receiver to execute the task in a separate Thread, thus permitting to the receiver to accept the next message in queue.

    Of course this approach assumes that the result of each operation (the writing on the db, if I understood correctly) does not influence in any way the result of the subsequent operations in response from other messages.

提交回复
热议问题