Rabbitmq HA settings
Closed this issue · 4 comments
Thank you for the fix with the hostname. That is all working.
What I noticed is that the default queue "/" is not set to HA-All. So this means that the queues aren't replicating between pods. So during patching, i am not getting true HA.
https://www.rabbitmq.com/ha.html
I am not sure if you want to add this but I added another entry to the config.map called policy.json with the following contents:
Note: I changed the user name and password in my config :)
{
"vhosts":[
{
"name": "/"
}
],
"users": [
{
"name": "guest",
"password": "guest",
"hashing_algorithm": "rabbit_password_hashing_sha256",
"tags": "administrator"
}
],
"permissions": [
{
"user": "guest",
"vhost": "\/",
"configure": ".*",
"write": ".*",
"read": ".*"
}
],
"policies":[
{
"vhost": "/",
"name": "ha-all",
"pattern": "",
"definition": {
"ha-mode": "all",
"ha-sync-mode": "automatic",
"ha-sync-batch-size": 5
}
}
]
}
Then added this line to the bottom of the rabbitmq.conf config.map entry:
management.load_definitions = /etc/rabbitmq/policy.json
And updated the deployment.yaml with:
volumes:
- configMap:
defaultMode: 420
items:
- key: rabbitmq.conf
path: rabbitmq.conf
- key: enabled_plugins
path: enabled_plugins
**- key: policy.json
path: policy.json**
name: rabbitmq-config
name: config-volume
I also put updated the resource settings :
CPU: 300 millicores to 1 core
Memory: 1 GiB to 2 GiB
PS. I haven't tried the new Quorum features yet.
https://www.rabbitmq.com/quorum-queues.html
Thank you for the feedback @gil0109, would you be willing to submit your suggested changes as a PR? They all sound good to me.
@pabrahamsson Will do thanks. I am relatively new to this but happy to help.
@pabrahamsson Pull request submitted:
Update rabbitmq configuration #320
Closed by #320