Will a RabbitMQ message be lost if it is published to an exchange with a specific routing key when the consumer queue does not yet exist?

WBOY
Release: 2024-02-06 10:00:03
forward
1000 people have browsed it

当消费者队列尚不存在时,如果将 RabbitMQ 消息发布到具有特定路由键的交换器,是否会丢失?

Question content

When I publish a message to RabbitMQ, is the message sent to exchange with a specific routing key, when the consumer queue does not yet exist? , will the message be lost?


Correct answer


Yes, RabbitMQ will discard the message.

But, you care about your data, so you use Publisher Confirmation a>, right? If so, RabbitMQ will send back a message indicating that your message was not routed.

You can also specify an alternate exchange to capture these messages.

The above is the detailed content of Will a RabbitMQ message be lost if it is published to an exchange with a specific routing key when the consumer queue does not yet exist?. For more information, please follow other related articles on the PHP Chinese website!

source:stackoverflow.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!