From ac4e5ee56f94ac9ae6cd4594991df06b9032d820 Mon Sep 17 00:00:00 2001 From: Takashi Kajinami Date: Mon, 9 Sep 2024 14:15:44 +0900 Subject: [PATCH] Add support for [oslo_messaging_rabbit] rabbit_stream_fanout Change-Id: I779ae835d29b24605c1651048a46b01c0a2587b2 --- manifests/messaging/rabbit.pp | 7 +++++++ .../notes/rabbit_stream_fanout-4f916e1821642b08.yaml | 5 +++++ spec/defines/oslo_messaging_rabbit_spec.rb | 3 +++ 3 files changed, 15 insertions(+) create mode 100644 releasenotes/notes/rabbit_stream_fanout-4f916e1821642b08.yaml diff --git a/manifests/messaging/rabbit.pp b/manifests/messaging/rabbit.pp index 439f3e8..85652cb 100644 --- a/manifests/messaging/rabbit.pp +++ b/manifests/messaging/rabbit.pp @@ -152,6 +152,11 @@ # (Optional) Process name used by queue manager. # Defaults to $facts['os_service_default'] # +# [*rabbit_stream_fanout*] +# (Optional) Use stream queues in RabbitMQ (x-queue-type: stream) for +# fanout queues. +# Defaults to $facts['os_service_default'] +# define oslo::messaging::rabbit( $amqp_durable_queues = $facts['os_service_default'], $kombu_ssl_version = $facts['os_service_default'], @@ -182,6 +187,7 @@ define oslo::messaging::rabbit( $use_queue_manager = $facts['os_service_default'], $hostname = $facts['os_service_default'], $processname = $facts['os_service_default'], + $rabbit_stream_fanout = $facts['os_service_default'], ){ $kombu_ssl_ca_certs_set = (!is_service_default($kombu_ssl_ca_certs) and ($kombu_ssl_ca_certs)) @@ -238,6 +244,7 @@ define oslo::messaging::rabbit( 'oslo_messaging_rabbit/use_queue_manager' => { value => $use_queue_manager }, 'oslo_messaging_rabbit/hostname' => { value => $hostname }, 'oslo_messaging_rabbit/processname' => { value => $processname }, + 'oslo_messaging_rabbit/rabbit_stream_fanout' => { value => $rabbit_stream_fanout }, 'oslo_messaging_rabbit/ssl_ca_file' => { value => $kombu_ssl_ca_certs }, 'oslo_messaging_rabbit/ssl_cert_file' => { value => $kombu_ssl_certfile }, 'oslo_messaging_rabbit/ssl_key_file' => { value => $kombu_ssl_keyfile }, diff --git a/releasenotes/notes/rabbit_stream_fanout-4f916e1821642b08.yaml b/releasenotes/notes/rabbit_stream_fanout-4f916e1821642b08.yaml new file mode 100644 index 0000000..6b7fd10 --- /dev/null +++ b/releasenotes/notes/rabbit_stream_fanout-4f916e1821642b08.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``oslo::messaging::rabbit::rabbit_stream_fanout`` parmaeter has + been added. diff --git a/spec/defines/oslo_messaging_rabbit_spec.rb b/spec/defines/oslo_messaging_rabbit_spec.rb index 550981d..c77e29d 100644 --- a/spec/defines/oslo_messaging_rabbit_spec.rb +++ b/spec/defines/oslo_messaging_rabbit_spec.rb @@ -33,6 +33,7 @@ describe 'oslo::messaging::rabbit' do is_expected.to contain_keystone_config('oslo_messaging_rabbit/use_queue_manager').with_value('') is_expected.to contain_keystone_config('oslo_messaging_rabbit/hostname').with_value('') is_expected.to contain_keystone_config('oslo_messaging_rabbit/processname').with_value('') + is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_stream_fanout').with_value('') end end @@ -54,6 +55,7 @@ describe 'oslo::messaging::rabbit' do :use_queue_manager => false, :hostname => 'node1.example.com', :processname => 'procname', + :rabbit_stream_fanout => false, } end @@ -73,6 +75,7 @@ describe 'oslo::messaging::rabbit' do is_expected.to contain_keystone_config('oslo_messaging_rabbit/use_queue_manager').with_value(false) is_expected.to contain_keystone_config('oslo_messaging_rabbit/hostname').with_value('node1.example.com') is_expected.to contain_keystone_config('oslo_messaging_rabbit/processname').with_value('procname') + is_expected.to contain_keystone_config('oslo_messaging_rabbit/rabbit_stream_fanout').with_value(false) end end