diff --git a/manifests/init.pp b/manifests/init.pp index 67809532..3038510c 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -57,6 +57,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'] +# # [*rabbit_use_ssl*] # (Optional) Connect over SSL for RabbitMQ. # Defaults to $facts['os_service_default']. @@ -251,6 +269,10 @@ class heat( $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'], $rabbit_use_ssl = $facts['os_service_default'], $kombu_ssl_ca_certs = $facts['os_service_default'], $kombu_ssl_certfile = $facts['os_service_default'], @@ -312,19 +334,23 @@ class heat( } oslo::messaging::rabbit { 'heat_config': - kombu_ssl_version => $kombu_ssl_version, - kombu_ssl_keyfile => $kombu_ssl_keyfile, - kombu_ssl_certfile => $kombu_ssl_certfile, - kombu_ssl_ca_certs => $kombu_ssl_ca_certs, - kombu_reconnect_delay => $kombu_reconnect_delay, - kombu_failover_strategy => $kombu_failover_strategy, - kombu_compression => $kombu_compression, - heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, - heartbeat_rate => $rabbit_heartbeat_rate, - heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, - rabbit_use_ssl => $rabbit_use_ssl, - amqp_durable_queues => $amqp_durable_queues, - rabbit_ha_queues => $rabbit_ha_queues, + kombu_ssl_version => $kombu_ssl_version, + kombu_ssl_keyfile => $kombu_ssl_keyfile, + kombu_ssl_certfile => $kombu_ssl_certfile, + kombu_ssl_ca_certs => $kombu_ssl_ca_certs, + kombu_reconnect_delay => $kombu_reconnect_delay, + kombu_failover_strategy => $kombu_failover_strategy, + kombu_compression => $kombu_compression, + heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, + heartbeat_rate => $rabbit_heartbeat_rate, + heartbeat_in_pthread => $rabbit_heartbeat_in_pthread, + rabbit_use_ssl => $rabbit_use_ssl, + amqp_durable_queues => $amqp_durable_queues, + 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::amqp { 'heat_config': diff --git a/releasenotes/notes/rabbit-quorum-queue-1d23361d4b7c69cf.yaml b/releasenotes/notes/rabbit-quorum-queue-1d23361d4b7c69cf.yaml new file mode 100644 index 00000000..f09f779a --- /dev/null +++ b/releasenotes/notes/rabbit-quorum-queue-1d23361d4b7c69cf.yaml @@ -0,0 +1,4 @@ +--- +features: + - | + The ``heat`` class now supports options for quorum queues in RabbitMQ. diff --git a/spec/classes/heat_init_spec.rb b/spec/classes/heat_init_spec.rb index bdd41c4c..85c7fc8f 100644 --- a/spec/classes/heat_init_spec.rb +++ b/spec/classes/heat_init_spec.rb @@ -125,19 +125,23 @@ describe 'heat' do shared_examples_for 'configures default rabbitmq parameters' do it 'configures rabbit' do is_expected.to contain_oslo__messaging__rabbit('heat_config').with( - :kombu_ssl_version => '', - :kombu_ssl_keyfile => '', - :kombu_ssl_certfile => '', - :kombu_ssl_ca_certs => '', - :kombu_reconnect_delay => '', - :kombu_failover_strategy => '', - :kombu_compression => '', - :heartbeat_timeout_threshold => '', - :heartbeat_rate => '', - :heartbeat_in_pthread => '', - :rabbit_use_ssl => '', - :amqp_durable_queues => '', - :rabbit_ha_queues => '', + :kombu_ssl_version => '', + :kombu_ssl_keyfile => '', + :kombu_ssl_certfile => '', + :kombu_ssl_ca_certs => '', + :kombu_reconnect_delay => '', + :kombu_failover_strategy => '', + :kombu_compression => '', + :heartbeat_timeout_threshold => '', + :heartbeat_rate => '', + :heartbeat_in_pthread => '', + :rabbit_use_ssl => '', + :amqp_durable_queues => '', + :rabbit_ha_queues => '', + :rabbit_quorum_queue => '', + :rabbit_quorum_delivery_limit => '', + :rabbit_quorum_max_memory_length => '', + :rabbit_quorum_max_memory_bytes => '', ) end end @@ -150,19 +154,23 @@ describe 'heat' do it 'configures rabbit' do is_expected.to contain_oslo__messaging__rabbit('heat_config').with( - :kombu_ssl_version => '', - :kombu_ssl_keyfile => '', - :kombu_ssl_certfile => '', - :kombu_ssl_ca_certs => '', - :kombu_reconnect_delay => '', - :kombu_failover_strategy => '', - :kombu_compression => '', - :heartbeat_timeout_threshold => '', - :heartbeat_rate => '', - :heartbeat_in_pthread => '', - :rabbit_use_ssl => '', - :amqp_durable_queues => true, - :rabbit_ha_queues => true, + :kombu_ssl_version => '', + :kombu_ssl_keyfile => '', + :kombu_ssl_certfile => '', + :kombu_ssl_ca_certs => '', + :kombu_reconnect_delay => '', + :kombu_failover_strategy => '', + :kombu_compression => '', + :heartbeat_timeout_threshold => '', + :heartbeat_rate => '', + :heartbeat_in_pthread => '', + :rabbit_use_ssl => '', + :amqp_durable_queues => true, + :rabbit_ha_queues => true, + :rabbit_quorum_queue => '', + :rabbit_quorum_delivery_limit => '', + :rabbit_quorum_max_memory_length => '', + :rabbit_quorum_max_memory_bytes => '', ) end end