Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
消费者消费后我有一些代码,现在由于消息队列是异步的,即使消费者没有消费消息,流程也会继续。我想等到消费者收到消息,然后需要暂停流程。有什么办法吗?我正在使用 RabbitMQ Java 实现,并且正在使用主题交换。
在您的情况下,您可以将您的队列设置为惰性队列,以便消息将存储在磁盘上,直到消费者回来并选择您的消息。
https://www.rabbitmq.com/lazy-queues.html