How do I set a number of retry attempts in RabbitMQ?

前端 未结 3 1577
暖寄归人
暖寄归人 2020-11-29 01:55

I am using RabbitMQ and I have a queue that holds email messages. My consumer service de-queues messages and attempts to send them. If, for any reason, my consumer cannot se

3条回答
  •  失恋的感觉
    2020-11-29 02:16

    From my perspective the better idea here is to implement a combination of dead-letter exchange and retry logic inside of the consumer. If the consumer fails to handle the message then you put a message into a DeadLetterQueue

    Bellow you can find a prototype of dead-letter-exchange implemented with node-amqp and Rabbitmq https://github.com/kharandziuk/dead-letter-exchange-prototype.

提交回复
热议问题