V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
yibinhp
V2EX  ›  RabbitMQ

RabbitMQ 在有多个消费者(单个应用部署多个实例)的情况下如何保证顺序消费

  •  
  •   yibinhp · Oct 19, 2021 · 1926 views
    This topic created in 1651 days ago, the information mentioned may be changed or developed.

    在实际业务场景中出现这个情况,某些业务依赖 RabbitMQ 来做异步动作

    队列消费者:A 、B

    队列内消息:1 、2 、3 、4 、5....

    怎么保证消息 1 、2 、3 、4 、5 被 A 、B 有序消费

    1 replies    2021-10-19 18:49:57 +08:00
    sxw11
        1
    sxw11  
       Oct 19, 2021
    我觉得你可以从生产者考虑,是不是消息必须全局有序,如果不是,不就可以变更成局部有序 发到多个 topic 来处理了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4847 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 58ms · UTC 01:05 · PVG 09:05 · LAX 18:05 · JFK 21:05
    ♥ Do have faith in what you're doing.