From a76c93a84c0fcbd0ac23cac828ecd9295b68371b Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Wed, 18 Sep 2024 23:11:06 +0900 Subject: [PATCH] Expose rabbit_qos_prefetch_count The option was supported by puppet-oslo but was not configurable via this module. Change-Id: Ie46b178c847e33688a87d07093eb939af1403c66 --- manifests/api.pp | 6 ++++++ .../notes/rabbit_qos_prefetch_count-e1ed7f53831ee203.yaml | 5 +++++ spec/classes/barbican_api_spec.rb | 3 +++ 3 files changed, 14 insertions(+) create mode 100644 releasenotes/notes/rabbit_qos_prefetch_count-e1ed7f53831ee203.yaml diff --git a/manifests/api.pp b/manifests/api.pp index bb904b39..6b4db6bc 100644 --- a/manifests/api.pp +++ b/manifests/api.pp @@ -113,6 +113,10 @@ # will be run through a green thread. # Defaults to $facts['os_service_default'] # +# [*rabbit_qos_prefetch_count*] +# (Optional) Specifies the number of messages to prefetch. +# Defaults to $facts['os_service_default'] +# # [*amqp_durable_queues*] # (optional) Define queues as "durable" to rabbitmq. # Defaults to $facts['os_service_default'] @@ -260,6 +264,7 @@ class barbican::api ( $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'], $rabbit_heartbeat_rate = $facts['os_service_default'], $rabbit_heartbeat_in_pthread = $facts['os_service_default'], + $rabbit_qos_prefetch_count = $facts['os_service_default'], $rabbit_ha_queues = $facts['os_service_default'], $rabbit_quorum_queue = $facts['os_service_default'], $rabbit_transient_quorum_queue = $facts['os_service_default'], @@ -322,6 +327,7 @@ class barbican::api ( heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, heartbeat_rate => $rabbit_heartbeat_rate, heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, + rabbit_qos_prefetch_count => $rabbit_qos_prefetch_count, kombu_reconnect_delay => $kombu_reconnect_delay, kombu_failover_strategy => $kombu_failover_strategy, amqp_durable_queues => $amqp_durable_queues, diff --git a/releasenotes/notes/rabbit_qos_prefetch_count-e1ed7f53831ee203.yaml b/releasenotes/notes/rabbit_qos_prefetch_count-e1ed7f53831ee203.yaml new file mode 100644 index 00000000..eddc981d --- /dev/null +++ b/releasenotes/notes/rabbit_qos_prefetch_count-e1ed7f53831ee203.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``barbican::api::rabbit_qos_prefetch_count`` parameter has been + added. diff --git a/spec/classes/barbican_api_spec.rb b/spec/classes/barbican_api_spec.rb index 1c4906b8..33a77580 100644 --- a/spec/classes/barbican_api_spec.rb +++ b/spec/classes/barbican_api_spec.rb @@ -35,6 +35,7 @@ describe 'barbican::api' do :rabbit_heartbeat_timeout_threshold => '', :rabbit_heartbeat_rate => '', :rabbit_heartbeat_in_pthread => '', + :rabbit_qos_prefetch_count => '', :rabbit_ha_queues => '', :rabbit_quorum_queue => '', :rabbit_transient_quorum_queue => '', @@ -84,6 +85,7 @@ describe 'barbican::api' do :rabbit_heartbeat_timeout_threshold => '10', :rabbit_heartbeat_rate => '10', :rabbit_heartbeat_in_pthread => true, + :rabbit_qos_prefetch_count => 0, :rabbit_ha_queues => true, :rabbit_quorum_queue => true, :rabbit_transient_quorum_queue => true, @@ -172,6 +174,7 @@ describe 'barbican::api' do :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], + :rabbit_qos_prefetch_count => param_hash[:rabbit_qos_prefetch_count], :kombu_reconnect_delay => param_hash[:kombu_reconnect_delay], :kombu_failover_strategy => param_hash[:kombu_failover_strategy], :amqp_durable_queues => param_hash[:amqp_durable_queues],