Messages don't survive Pod restarts in Rabbitmq autocluster Kubernetes installation

喜你入骨 提交于 2019-12-25 00:45:06

问题


I have created Rabbitmq autocluster with 3 Pods in Kubernetes according to public repository: https://github.com/kuberstack/kubernetes-rabbitmq-autocluster

Messages in queue don't survive Pod restarts in the following basic scenario:

  1. Create durable queue "test"
  2. Send message to queue "test"
  3. Wait 10 minutes and delete pod 1.
  4. Wait 10 minutes and delete pod 2.
  5. Wait 10 minutes and delete pod 3.
  6. List queues.

After deleting all 3 pods, queue "test" always doesn't exist. After each pod deletion, cluster is working properly, I can send and receive new messages.

It looks like Rabbitmq doesn't replicate existent messages to new pods. How can I force Rabbitmq to share all messages with new pods?

Many Thanks,

RabbitMq Startup Logs: Log file


回答1:


You need to verify if the queues have their contents mirrored accross the cluster.

RMQ allows administrator to create policies applying to some/all queues, so that the messages contained inside are replicated. Otherwise one message is stored on only one broker, what makes it unavailable if that broker goes down.

The policy description is present at https://www.rabbitmq.com/ha.html



来源:https://stackoverflow.com/questions/46892531/messages-dont-survive-pod-restarts-in-rabbitmq-autocluster-kubernetes-installat

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!