Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RabbitMQ发布订阅实战-实现延时重试队列 #3

Open
Blusez opened this issue Apr 18, 2019 · 1 comment
Open

RabbitMQ发布订阅实战-实现延时重试队列 #3

Blusez opened this issue Apr 18, 2019 · 1 comment

Comments

@Blusez
Copy link

Blusez commented Apr 18, 2019

请问这里三个交换机如何实现,消费者只消费master与master@retry这两个交换机,而master@fail中的消息不被消费?
谢谢

@mylxsw
Copy link
Owner

mylxsw commented Apr 18, 2019

消费者只需要消费 master 这个交换机,消费失败后,消息publish到 master@retry,这个重试交换机不需要订阅,投递给这个交换机的消息是放到 死信队列的,里面配置了x-dead-letter-exchange=master 这个属性,超时后,待重试消息会被重新投递到master交换机。

master@fail中的消息是需要单独处理的,单独订阅这个交换机来处理失败的消息(因为经过多次重试都没有成功,所以需要人工介入处理了)。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants