diff --git a/manifests/api.pp b/manifests/api.pp index f14d58a9..25ae17da 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -66,6 +66,24 @@ # (optional) Use HA queues in RabbitMQ. # 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'] +# # [*rabbit_heartbeat_timeout_threshold*] # (optional) Number of seconds after which the RabbitMQ broker is considered # down if the heartbeat keepalive fails. Any value >0 enables heartbeats. @@ -248,6 +266,10 @@ class barbican::api ( $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'], $amqp_durable_queues = $facts['os_service_default'], $enable_queue = $facts['os_service_default'], $queue_namespace = $facts['os_service_default'], @@ -307,19 +329,23 @@ class barbican::api ( } oslo::messaging::rabbit {'barbican_config': - rabbit_use_ssl => $rabbit_use_ssl, - heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, - heartbeat_rate => $rabbit_heartbeat_rate, - heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, - kombu_reconnect_delay => $kombu_reconnect_delay, - kombu_failover_strategy => $kombu_failover_strategy, - amqp_durable_queues => $amqp_durable_queues, - kombu_compression => $kombu_compression, - 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, - rabbit_ha_queues => $rabbit_ha_queues, + rabbit_use_ssl => $rabbit_use_ssl, + heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, + heartbeat_rate => $rabbit_heartbeat_rate, + heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, + kombu_reconnect_delay => $kombu_reconnect_delay, + kombu_failover_strategy => $kombu_failover_strategy, + amqp_durable_queues => $amqp_durable_queues, + kombu_compression => $kombu_compression, + 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, + rabbit_ha_queues => $rabbit_ha_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::default { 'barbican_config': diff --git a/releasenotes/notes/rabbit-quorum-queue-db6e4b8fd33ca086.yaml b/releasenotes/notes/rabbit-quorum-queue-db6e4b8fd33ca086.yaml new file mode 100644 index 00000000..ecdc87d4 --- /dev/null +++ b/releasenotes/notes/rabbit-quorum-queue-db6e4b8fd33ca086.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The ``barbican::api`` class now supports options for quorum queues in + RabbitMQ. diff --git a/spec/classes/barbican_api_spec.rb b/spec/classes/barbican_api_spec.rb index 3bcc131e..135c3ede 100644 --- a/spec/classes/barbican_api_spec.rb +++ b/spec/classes/barbican_api_spec.rb @@ -38,6 +38,10 @@ describe 'barbican::api' do :rabbit_heartbeat_rate => '', :rabbit_heartbeat_in_pthread => '', :rabbit_ha_queues => '', + :rabbit_quorum_queue => '', + :rabbit_quorum_delivery_limit => '', + :rabbit_quorum_max_memory_length => '', + :rabbit_quorum_max_memory_bytes => '', :amqp_durable_queues => '', :max_allowed_secret_in_bytes => '', :max_allowed_request_size_in_bytes => '', @@ -86,6 +90,10 @@ describe 'barbican::api' do :rabbit_heartbeat_rate => '10', :rabbit_heartbeat_in_pthread => true, :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_durable_queues => true, :enable_queue => true, :queue_namespace => 'barbican1', @@ -166,19 +174,23 @@ describe 'barbican::api' do :topics => param_hash[:notification_topics] ) is_expected.to contain_oslo__messaging__rabbit('barbican_config').with( - :rabbit_use_ssl => param_hash[:rabbit_use_ssl], - :heartbeat_timeout_threshold => param_hash[:rabbit_heartbeat_timeout_threshold], - :heartbeat_rate => param_hash[:rabbit_heartbeat_rate], - :heartbeat_in_pthread => param_hash[:rabbit_heartbeat_in_pthread], - :kombu_reconnect_delay => param_hash[:kombu_reconnect_delay], - :kombu_failover_strategy => param_hash[:kombu_failover_strategy], - :amqp_durable_queues => param_hash[:amqp_durable_queues], - :kombu_compression => param_hash[:kombu_compression], - :kombu_ssl_ca_certs => param_hash[:kombu_ssl_ca_certs], - :kombu_ssl_certfile => param_hash[:kombu_ssl_certfile], - :kombu_ssl_keyfile => param_hash[:kombu_ssl_keyfile], - :kombu_ssl_version => param_hash[:kombu_ssl_version], - :rabbit_ha_queues => param_hash[:rabbit_ha_queues], + :rabbit_use_ssl => param_hash[:rabbit_use_ssl], + :heartbeat_timeout_threshold => param_hash[:rabbit_heartbeat_timeout_threshold], + :heartbeat_rate => param_hash[:rabbit_heartbeat_rate], + :heartbeat_in_pthread => param_hash[:rabbit_heartbeat_in_pthread], + :kombu_reconnect_delay => param_hash[:kombu_reconnect_delay], + :kombu_failover_strategy => param_hash[:kombu_failover_strategy], + :amqp_durable_queues => param_hash[:amqp_durable_queues], + :kombu_compression => param_hash[:kombu_compression], + :kombu_ssl_ca_certs => param_hash[:kombu_ssl_ca_certs], + :kombu_ssl_certfile => param_hash[:kombu_ssl_certfile], + :kombu_ssl_keyfile => param_hash[:kombu_ssl_keyfile], + :kombu_ssl_version => param_hash[:kombu_ssl_version], + :rabbit_ha_queues => param_hash[:rabbit_ha_queues], + :rabbit_quorum_queue => param_hash[:rabbit_quorum_queue], + :rabbit_quorum_delivery_limit => param_hash[:rabbit_quorum_delivery_limit], + :rabbit_quorum_max_memory_length => param_hash[:rabbit_quorum_max_memory_length], + :rabbit_quorum_max_memory_bytes => param_hash[:rabbit_quorum_max_memory_bytes], ) end