)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"4ff57e63dc25ecfb2ef73f357849976ae978b6f1","unresolved":true,"context_lines":[{"line_number":7,"context_line":"Set RabbitMQ message TTL and queue expiry"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Following ideas here:"},{"line_number":10,"context_line":"https://wiki.openstack.org/wiki/Large_Scale_Configuration_Rabbit"},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Make sure old messages with no consumer are dropped after the message"},{"line_number":13,"context_line":"TTL of 10 mins, longer than the 1 min RPC timeout."}],"source_content_type":"text/x-gerrit-commit-message","patch_set":7,"id":"66533d9e_8646f9b0","line":10,"updated":"2023-03-24 15:05:51.000000000","message":"https://docs.openstack.org/large-scale/journey/configure/rabbitmq.html is the current link","commit_id":"fd30dfb86738028fbb4fabd2ed2125324d73e571"}],"/PATCHSET_LEVEL":[{"author":{"_account_id":31425,"name":"Albert Braden","email":"c-albert.braden@charter.com","username":"ozzzo"},"change_message_id":"8b45cc3e6342d19a702f5f0951ac638cf71aa42b","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"a63ed3f4_eedebd76","updated":"2022-01-19 14:55:01.000000000","message":"2 more issues:\n\n1. Quotes around the variable will cause an error\n2. Times are in ms not seconds\n\nThis is what I ended up with, to set TTL to 10 minutes and queue expiration to 20, for all \"notifications\" queues:\n\n{\"vhost\": \"/\", \"name\": \"notifications-expire\", \"pattern\": \"^(notifications|versioned_notifications).*\", \"apply-to\": \"queues\", \"definition\": {\"message-ttl\":{{ rabbitmq_message_ttl }},\"expires\":{{ rabbitmq_queue_expire }}}, \"priority\":0},\n\nAnd in ansible/roles/rabbitmq/defaults/main.yml:\n\nrabbitmq_message_ttl: 60000\nrabbitmq_queue_expire: 120000","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"},{"author":{"_account_id":31425,"name":"Albert Braden","email":"c-albert.braden@charter.com","username":"ozzzo"},"change_message_id":"8a4d521e01c746b8c929915a59ffbe5b4f0f91a0","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"3933b1f6_072926c4","updated":"2022-01-19 16:05:38.000000000","message":"I thought that I had correctly applied different policies to different sets of queues. Here\u0027s my entire policy section. I believe that this should exclude HA from the following:\n\n1. Queues starting with \"notifications\" or \"versioned_notifications\"\n2. Queues starting with \"amq.\"\n3. Queues with \"_fanout_\" anywhere in the name\n4. Queues starting with \"reply_\"\n\nAlso it should apply TTL/expiration only to queues starting with \"notifications\" or \"versioned_notifications\"\n\nThe third line is the original \"murano_agent\" HA; I\u0027m not sure what that does so I left it alone.\n\nAm I missing something?\n\n  \"policies\":[\n    {\"vhost\": \"/\", \"name\": \"notifications-expire\", \"pattern\": \"^(notifications|versioned_notifications).*\", \"apply-to\": \"queues\", \"definition\": {\"message-ttl\":{{ rabbitmq_message_ttl }},\"expires\":{{ rabbitmq_queue_expire }}}, \"priority\":0},\n    {\"vhost\": \"/\", \"name\": \"ha-all\", \"pattern\": \"^(?!(amq\\.)|(.*_fanout_)|(reply_)).*\", \"apply-to\": \"all\", \"definition\": {\"ha-mode\":\"all\",\"ha-sync-mode\":\"automatic\", \"ha-promote-on-shutdown\": \"always\" , \"ha-promote-on-failure\": \"always\"}, \"priority\":0}{% if project_name \u003d\u003d \u0027outward_rabbitmq\u0027 %},\n    {\"vhost\": \"{{ murano_agent_rabbitmq_vhost }}\", \"name\": \"ha-all\", \"pattern\": \".*\", \"apply-to\": \"all\", \"definition\": {\"ha-mode\":\"all\"}, \"priority\":0}\n    {% endif %}\n  ]\n}","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"},{"author":{"_account_id":31425,"name":"Albert Braden","email":"c-albert.braden@charter.com","username":"ozzzo"},"change_message_id":"9bfa3e40063615d44531eb599e109adf34bab8c1","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"6f8c0b5e_73313e9e","updated":"2022-01-12 21:36:04.000000000","message":"It looks like a quote is missing:\n\n{\"vhost\": \"/\", \"name\": \"ttl\", \"pattern\": \".*\", \"apply-to\": \"queues\", \"definition\": {\"message-ttl\":{{ rabbitmq_message_ttl | int }}\",\"expires\":3600}, \"priority\":0},\n\nShould be:\n\n{\"vhost\": \"/\", \"name\": \"ttl\", \"pattern\": \".*\", \"apply-to\": \"queues\", \"definition\": {\"message-ttl\":\"{{ rabbitmq_message_ttl | int }}\",\"expires\":3600}, \"priority\":0},","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"},{"author":{"_account_id":782,"name":"John Garbutt","email":"john@johngarbutt.com","username":"johngarbutt"},"change_message_id":"67f45b429acd419bd8bd93931f7f0b222322cd87","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7fbb1e80_b17814a2","updated":"2021-12-17 18:19:13.000000000","message":"Much less sure about this last one at the moment.","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"},{"author":{"_account_id":14394,"name":"Dale Smith","email":"dale@catalystcloud.nz","username":"dalees"},"change_message_id":"a419c621ba05d082007c0395b253b4e5e5150c4e","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"7e042379_78950fcf","updated":"2022-01-12 21:54:57.000000000","message":"This change may disable the `ha-all` policy, as only one can apply to a queue or exchange. Consider altering the existing policies instead of creating another.\n\n\"Each exchange or queue will have at most one policy matching\" - https://www.rabbitmq.com/parameters.html#how-policies-work\n\n","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"e64956df9d20f8122de0364349c957d54f3d625c","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"c9e524bd_712cd176","updated":"2023-02-06 11:51:27.000000000","message":"Thanks for updating, please can we rebase on master?","commit_id":"1b265bfb7de7349bb4990e2cf5bee882c82ceddf"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"efb5ed39a9c7cf0f1691a100b626759fc6be7def","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":5,"id":"3aa6bdef_ca9e5c55","updated":"2023-02-20 09:43:57.000000000","message":"Thanks for updating. Just need to fix the var name.","commit_id":"cc9c1079af5bb595a2fce2928208508a17cc454e"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"ed74fd4444598bfd99eb74de21152eca6d2e7295","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":6,"id":"886e889c_57290a49","updated":"2023-02-20 10:13:36.000000000","message":"Linter issue looks unrelated, +2 from me.","commit_id":"aeda6b40bb4e3088f5d1ddfd2c2b114f08156c8c"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"70d13abac3c2ddbc09f786162e767d0c3358d25f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"e68114a4_5700296b","updated":"2023-03-24 12:10:26.000000000","message":"Still looks good.","commit_id":"fd30dfb86738028fbb4fabd2ed2125324d73e571"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"00ea2ab4009cb1b0ca4708e464ba47dfcaec3cb2","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":7,"id":"f03530cf_b9cfae18","updated":"2023-03-21 11:31:19.000000000","message":"recheck","commit_id":"fd30dfb86738028fbb4fabd2ed2125324d73e571"}],"ansible/roles/rabbitmq/defaults/main.yml":[{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"31d589fd3ffa4beed2364c0e27908ca66db8f46f","unresolved":true,"context_lines":[{"line_number":104,"context_line":"rabbitmq_ha_replica_count: \"{{ (rabbitmq_server_count // 2 + 1) | int }}\""},{"line_number":105,"context_line":"# Set max message ttl to 10 mins (more than 1 min rpc timeout)"},{"line_number":106,"context_line":"# so we don\u0027t have queues with no consumers growing unbounded"},{"line_number":107,"context_line":"rabbitmq_message_ttl: 600"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"30072656_52afe17a","line":107,"updated":"2022-01-10 11:26:12.000000000","message":"Currently, this will translate to a 600ms TTL:\n\n```\nThe value of the TTL argument or policy must be a non-negative integer (0 \u003c\u003d n), describing the TTL period in milliseconds. Thus a value of 1000 means that a message added to the queue will live in the queue for 1 second or until it is delivered to a consumer.\n```\nhttps://www.rabbitmq.com/ttl.html\n\n\nShould we also append units to the variable name? `rabbitmq_message_ttl_ms`?","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"e64956df9d20f8122de0364349c957d54f3d625c","unresolved":false,"context_lines":[{"line_number":104,"context_line":"rabbitmq_ha_replica_count: \"{{ (rabbitmq_server_count // 2 + 1) | int }}\""},{"line_number":105,"context_line":"# Set max message ttl to 10 mins (more than 1 min rpc timeout)"},{"line_number":106,"context_line":"# so we don\u0027t have queues with no consumers growing unbounded"},{"line_number":107,"context_line":"rabbitmq_message_ttl: 600"}],"source_content_type":"text/x-yaml","patch_set":1,"id":"13da2eda_b0bda7c9","line":107,"in_reply_to":"30072656_52afe17a","updated":"2023-02-06 11:51:27.000000000","message":"Done","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"efb5ed39a9c7cf0f1691a100b626759fc6be7def","unresolved":true,"context_lines":[{"line_number":96,"context_line":"# If no TTL is specified, messages will not expire"},{"line_number":97,"context_line":"# Set max message ttl to 10 mins (more than 1 min rpc timeout)"},{"line_number":98,"context_line":"# so we don\u0027t have queues with no consumers growing unbounded"},{"line_number":99,"context_line":"rabbitmq_message_ttl: 600000"},{"line_number":100,"context_line":"# If no queue expiry is specified, queues will not expire"},{"line_number":101,"context_line":"rabbitmq_queue_expiry_ms: 3600000"},{"line_number":102,"context_line":"rabbitmq_extra_config: {}"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"dd78b5aa_be8eaf09","line":99,"updated":"2023-02-20 09:43:57.000000000","message":"s/rabbitmq_message_ttl/rabbitmq_message_ttl_ms","commit_id":"cc9c1079af5bb595a2fce2928208508a17cc454e"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"c1fc98d8950e461b84ae1dc88e7ee86975467df7","unresolved":false,"context_lines":[{"line_number":96,"context_line":"# If no TTL is specified, messages will not expire"},{"line_number":97,"context_line":"# Set max message ttl to 10 mins (more than 1 min rpc timeout)"},{"line_number":98,"context_line":"# so we don\u0027t have queues with no consumers growing unbounded"},{"line_number":99,"context_line":"rabbitmq_message_ttl: 600000"},{"line_number":100,"context_line":"# If no queue expiry is specified, queues will not expire"},{"line_number":101,"context_line":"rabbitmq_queue_expiry_ms: 3600000"},{"line_number":102,"context_line":"rabbitmq_extra_config: {}"}],"source_content_type":"text/x-yaml","patch_set":5,"id":"04340aa6_6fa095c6","line":99,"in_reply_to":"dd78b5aa_be8eaf09","updated":"2023-02-20 09:51:28.000000000","message":"Done","commit_id":"cc9c1079af5bb595a2fce2928208508a17cc454e"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"4ff57e63dc25ecfb2ef73f357849976ae978b6f1","unresolved":true,"context_lines":[{"line_number":103,"context_line":"# Set max message ttl to 10 mins (more than 1 min rpc timeout)"},{"line_number":104,"context_line":"# so we don\u0027t have queues with no consumers growing unbounded"},{"line_number":105,"context_line":"rabbitmq_message_ttl_ms: 600000"},{"line_number":106,"context_line":"# If no queue expiry is specified, queues will not expire"},{"line_number":107,"context_line":"rabbitmq_queue_expiry_ms: 3600000"},{"line_number":108,"context_line":"rabbitmq_extra_config: {}"},{"line_number":109,"context_line":""}],"source_content_type":"text/x-yaml","patch_set":7,"id":"3ccebd63_9a73c547","line":106,"updated":"2023-03-24 15:05:51.000000000","message":"Can we amend this comment, too? Doesn\u0027t seem to match if the default is non-empty","commit_id":"fd30dfb86738028fbb4fabd2ed2125324d73e571"}],"ansible/roles/rabbitmq/templates/definitions.json.j2":[{"author":{"_account_id":14394,"name":"Dale Smith","email":"dale@catalystcloud.nz","username":"dalees"},"change_message_id":"a419c621ba05d082007c0395b253b4e5e5150c4e","unresolved":true,"context_lines":[{"line_number":17,"context_line":"    {% endif %}"},{"line_number":18,"context_line":"  ],"},{"line_number":19,"context_line":"  \"policies\":["},{"line_number":20,"context_line":"    {\"vhost\": \"/\", \"name\": \"ttl\", \"pattern\": \".*\", \"apply-to\": \"queues\", \"definition\": {\"message-ttl\":{{ rabbitmq_message_ttl | int }}\",\"expires\":3600}, \"priority\":0},"},{"line_number":21,"context_line":"    {\"vhost\": \"/\", \"name\": \"ha-all\", \"pattern\": \"^(?!(amq\\.)|(.*_fanout_)|(reply_)).*\", \"apply-to\": \"all\", \"definition\": {\"ha-mode\":\"exactly\",\"ha-params\":{{ rabbitmq_ha_replica_count | int }},\"ha-promote-on-shutdown\":\"{{ rabbitmq_ha_promote_on_shutdown }}\"}, \"priority\":0}{% if project_name \u003d\u003d \u0027outward_rabbitmq\u0027 %},"},{"line_number":22,"context_line":"    {\"vhost\": \"{{ murano_agent_rabbitmq_vhost }}\", \"name\": \"ha-all\", \"pattern\": \".*\", \"apply-to\": \"all\", \"definition\": {\"ha-mode\":\"all\"}, \"priority\":0}"},{"line_number":23,"context_line":"    {% endif %}"}],"source_content_type":"text/x-jinja2","patch_set":1,"id":"67400454_835d1ede","line":20,"updated":"2022-01-12 21:54:57.000000000","message":"RabbitMQ policies are not combined[1], only one applies for any queue - so this new policy `ttl` may remove the HA params from `ha-all`, or not be effective.\n\nOperator policies[2] may be an option, but just adding to existing policies is likely the best, here.\n\n[1] https://www.rabbitmq.com/parameters.html#combining-policy-definitions\n[2] https://www.rabbitmq.com/parameters.html#operator-policies","commit_id":"250a0ca6320538a687a570f2ee7ef90ca1127cd7"}],"releasenotes/notes/rabbitmq-set-message-ttl-and-queue-expiry-90c16da5e14c0265.yaml":[{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"e64956df9d20f8122de0364349c957d54f3d625c","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    In RabbitMQ, messages now have a TTL of 10 minutes and inactive queues will"},{"line_number":5,"context_line":"    expire after 1 hour."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"d426e995_2c0f8353","line":4,"updated":"2023-02-06 11:51:27.000000000","message":"Do we need to recreate all the queues for this to be applied to all of them? If so, please can we add an upgrade note?","commit_id":"1b265bfb7de7349bb4990e2cf5bee882c82ceddf"},{"author":{"_account_id":35263,"name":"Matt Crees","email":"mattc@stackhpc.com","username":"mattcrees"},"change_message_id":"59d2ff12b0e65ca7046aed846b95472679c17d8a","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"other:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    In RabbitMQ, messages now have a TTL of 10 minutes and inactive queues will"},{"line_number":5,"context_line":"    expire after 1 hour."}],"source_content_type":"text/x-yaml","patch_set":3,"id":"dfe5fee9_f770b436","line":4,"in_reply_to":"d426e995_2c0f8353","updated":"2023-02-16 16:33:51.000000000","message":"Done","commit_id":"1b265bfb7de7349bb4990e2cf5bee882c82ceddf"},{"author":{"_account_id":17669,"name":"Doug Szumski","email":"doug@stackhpc.com","username":"DougSzumski"},"change_message_id":"efb5ed39a9c7cf0f1691a100b626759fc6be7def","unresolved":true,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"upgrade:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    In RabbitMQ, messages now have a TTL of 10 minutes and inactive queues will"},{"line_number":5,"context_line":"    expire after 1 hour. These queue arguments can be changed dynamically at"},{"line_number":6,"context_line":"    runtime [1], but it should be noted that applying a TTL to queues which"},{"line_number":7,"context_line":"    already have messages will discard the messages when specific events occur."}],"source_content_type":"text/x-yaml","patch_set":5,"id":"aa10d8f7_23f57182","line":4,"updated":"2023-02-20 09:43:57.000000000","message":"Thanks for adding this. It sounds like in practise, where you don\u0027t generally have messages queuing up for long, the risk of causing an issue is fairly low.","commit_id":"cc9c1079af5bb595a2fce2928208508a17cc454e"},{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"4ff57e63dc25ecfb2ef73f357849976ae978b6f1","unresolved":true,"context_lines":[{"line_number":9,"context_line":"    definitions.json are now changed, meaning RabbitMQ containers will be"},{"line_number":10,"context_line":"    restarted on next deploy/upgrade."},{"line_number":11,"context_line":"    [1] https://www.rabbitmq.com/queues.html#optional-arguments"},{"line_number":12,"context_line":"    [2] https://www.rabbitmq.com/ttl.html#per-message-ttl-caveats"}],"source_content_type":"text/x-yaml","patch_set":7,"id":"b6066a12_d881184b","line":12,"updated":"2023-03-24 15:05:51.000000000","message":"Maybe also add this to our rmq doc? Fine to do as a followup.","commit_id":"fd30dfb86738028fbb4fabd2ed2125324d73e571"}]}
