Merge "RabbitMQ: Add support for quorum queue options"

This commit is contained in:
Zuul 2023-09-15 16:09:32 +00:00 committed by Gerrit Code Review
commit ea04b9980c
3 changed files with 81 additions and 39 deletions

View File

@ -66,6 +66,24 @@
# will be run through a green thread.
# Defaults to $facts['os_service_default']
#
# [*rabbit_quorum_queue*]
# (Optional) Use quorum queues in RabbitMQ.
# Defaults to $facts['os_service_default']
#
# [*rabbit_quorum_delivery_limit*]
# (Optional) Each time a message is rdelivered to a consumer, a counter is
# incremented. Once the redelivery count exceeds the delivery limit
# the message gets dropped or dead-lettered.
# Defaults to $facts['os_service_default']
#
# [*rabbit_quorum_max_memory_length*]
# (Optional) Limit the number of messages in the quorum queue.
# Defaults to $facts['os_service_default']
#
# [*rabbit_quorum_max_memory_bytes*]
# (Optional) Limit the number of memory bytes used by the quorum queue.
# Defaults to $facts['os_service_default']
#
# [*kombu_ssl_ca_certs*]
# (optional) SSL certification authority file (valid only if SSL enabled).
# Defaults to $facts['os_service_default']
@ -197,6 +215,10 @@ class aodh (
$rabbit_heartbeat_rate = $facts['os_service_default'],
$rabbit_heartbeat_in_pthread = $facts['os_service_default'],
$rabbit_ha_queues = $facts['os_service_default'],
$rabbit_quorum_queue = $facts['os_service_default'],
$rabbit_quorum_delivery_limit = $facts['os_service_default'],
$rabbit_quorum_max_memory_length = $facts['os_service_default'],
$rabbit_quorum_max_memory_bytes = $facts['os_service_default'],
$kombu_ssl_ca_certs = $facts['os_service_default'],
$kombu_ssl_certfile = $facts['os_service_default'],
$kombu_ssl_keyfile = $facts['os_service_default'],
@ -253,6 +275,10 @@ class aodh (
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
kombu_compression => $kombu_compression,
amqp_durable_queues => $amqp_durable_queues,
rabbit_quorum_queue => $rabbit_quorum_queue,
rabbit_quorum_delivery_limit => $rabbit_quorum_delivery_limit,
rabbit_quorum_max_memory_length => $rabbit_quorum_max_memory_length,
rabbit_quorum_max_memory_bytes => $rabbit_quorum_max_memory_bytes,
}
oslo::messaging::amqp { 'aodh_config':

View File

@ -0,0 +1,4 @@
---
features:
- |
The ``aodh`` class now supports options for quorum queues in RabbitMQ.

View File

@ -42,6 +42,10 @@ describe 'aodh' do
:kombu_ssl_version => '<SERVICE DEFAULT>',
:rabbit_ha_queues => '<SERVICE DEFAULT>',
:rabbit_retry_interval => '<SERVICE DEFAULT>',
:rabbit_quorum_queue => '<SERVICE DEFAULT>',
:rabbit_quorum_delivery_limit => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
:rabbit_quorum_max_memory_bytes => '<SERVICE DEFAULT>',
)
is_expected.to contain_oslo__messaging__amqp('aodh_config').with(
:server_request_prefix => '<SERVICE DEFAULT>',
@ -96,6 +100,10 @@ describe 'aodh' do
:kombu_ssl_keyfile => '/etc/key',
:kombu_ssl_version => 'TLSv1',
:rabbit_ha_queues => true,
:rabbit_quorum_queue => true,
:rabbit_quorum_delivery_limit => 3,
:rabbit_quorum_max_memory_length => 5,
:rabbit_quorum_max_memory_bytes => 1073741824,
:amqp_idle_timeout => '60',
:amqp_trace => true,
:amqp_ssl_ca_file => '/etc/ca.cert',
@ -131,6 +139,10 @@ describe 'aodh' do
:kombu_ssl_keyfile => '/etc/key',
:kombu_ssl_version => 'TLSv1',
:rabbit_ha_queues => true,
:rabbit_quorum_queue => true,
:rabbit_quorum_delivery_limit => 3,
:rabbit_quorum_max_memory_length => 5,
:rabbit_quorum_max_memory_bytes => 1073741824,
)
is_expected.to contain_oslo__messaging__amqp('aodh_config').with(
:idle_timeout => '60',