简体   繁体   English

如何使Rabbitmq发送通知

[英]How to make rabbitmq send notifications

I'm using rabbitmq with spring, i need to be notified when a message goes to DLQ, is there any way to set up an email notification, for example? 我在spring上使用Rabbitmq,当消息发送到DLQ时需要通知我,例如,是否可以设置电子邮件通知? I'm thinking of creating a consumer for DLQ and that consumer trigger email, but it will remove the message from the queue and i want it to stay there. 我正在考虑为DLQ创建一个使用者,该使用者触发电子邮件,但是它将从队列中删除消息,我希望它保留在那里。

To be honest with the AMQP protocol we send messages to the Exchanges , not queues. 老实说,我们将消息发送到Exchange ,而不是队列。 No body stops you to declare the DLX as TopicExchange and have several queues to route the same message for different purposes. 没有人会阻止您将DLX声明为TopicExchange并且有多个队列可以出于不同目的路由同一条消息。

You can find more info in the RabbitMQ resource . 您可以在RabbitMQ 资源中找到更多信息。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM