RabbitMQ: Add support for quorum queue options

Depends-on: https://review.opendev.org/894866
Change-Id: Ib1ec7e7e3d39c58f3645ea934080b3389484a1ea
This commit is contained in:
Takashi Kajinami 2023-09-15 10:56:23 +09:00
parent 3504c344c0
commit b7f441682a
3 changed files with 58 additions and 24 deletions

View File

@ -98,6 +98,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_reconnect_delay*]
# (optional) How long to wait before reconnecting in response to an AMQP
# consumer cancel notification.
@ -269,6 +287,10 @@ class trove(
$rabbit_heartbeat_timeout_threshold = $facts['os_service_default'],
$rabbit_heartbeat_rate = $facts['os_service_default'],
$rabbit_heartbeat_in_pthread = $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'],
@ -397,7 +419,11 @@ class trove(
kombu_ssl_ca_certs => $kombu_ssl_ca_certs,
kombu_ssl_certfile => $kombu_ssl_certfile,
kombu_ssl_keyfile => $kombu_ssl_keyfile,
kombu_ssl_version => $kombu_ssl_version
kombu_ssl_version => $kombu_ssl_version,
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 { 'trove_config':

View File

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

View File

@ -65,6 +65,10 @@ describe 'trove' do
:kombu_ssl_certfile => '<SERVICE DEFAULT>',
:kombu_ssl_keyfile => '<SERVICE DEFAULT>',
:kombu_ssl_version => '<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('trove_config').with(
:server_request_prefix => '<SERVICE DEFAULT>',