【问题标题】:RabbitMQ: In case of a Master queue going down , Is there a way to get those messages which are not replicated to mirror queues?RabbitMQ:如果主队列出现故障,有没有办法获取那些未复制到镜像队列的消息?
【发布时间】:2017-03-01 16:35:20
【问题描述】:

When the master node comes up and we make it the mirror of newly elected master.

是否有配置或方法来重新排队那些在 master 宕机时没有复制到镜像的消息?。

我不想丢失这些消息。我使用 ack=1 因为我不想在生产者延迟上妥协。我可以接受延迟发送未复制的消息。

【问题讨论】:

    标签: rabbitmq


    【解决方案1】:

    例如使用automatic in ha-sync-mode

    rabbitmqctl set_policy ha-all "" '{"ha-mode":"all", ,"ha-sync-mode":"automatic"}'
    

    【讨论】:

    • 我不明白,使用"ha-sync-mode":"automatic" 消息会自动镜像。您以何种方式丢失消息?
    • 我不想使用自动模式。成功写入大师后,我的电话将返回。如果 master 出现故障并且某些消息未镜像,我可能会丢失消息。这是我在问题中编辑的内容
    猜你喜欢
    • 2014-03-07
    • 2017-12-02
    • 1970-01-01
    • 1970-01-01
    • 2018-08-10
    • 1970-01-01
    • 2012-03-27
    • 2012-04-21
    • 1970-01-01
    相关资源
    最近更新 更多