Author: Thomas Goirand <zigo@debian.org>
Date: Tue, 01 Jul 2025 11:44:43 +0200
Description: Add queue_manager and stream_fanout
 This patch adds two new parameters to the toplevel class:
 - rabbit_use_queue_manager
 - rabbit_stream_fanout
 .
 that are already handled by the oslo::messaging::rabbit class, which
 makes it impossible to set using mistral_config.
Change-Id: I003679a4d58433075504875ddbed485a4fa2e54f
Forwarded: https://review.opendev.org/c/openstack/puppet-mistral/+/953863
Last-Update: 2025-07-01

Index: puppet-module-mistral/manifests/init.pp
===================================================================
--- puppet-module-mistral.orig/manifests/init.pp
+++ puppet-module-mistral/manifests/init.pp
@@ -97,6 +97,14 @@
 #   (Optional) Limit the number of memory bytes used by the quorum queue.
 #   Defaults to $facts['os_service_default']
 #
+# [*rabbit_use_queue_manager*]
+#   (Optional) Should we use consistant queue names or random ones.
+#   Defaults to $facts['os_service_default']
+#
+# [*rabbit_stream_fanout*]
+#   (Optional) Use stream queues in RabbitMQ (x-queue-type: stream).
+#   Defaults to $facts['os_service_default']
+#
 # [*rabbit_enable_cancel_on_failover*]
 #   (Optional) Enable x-cancel-on-ha-failover flag so that rabbitmq server will
 #   cancel and notify consumers when queue is down.
@@ -215,6 +223,8 @@ class mistral(
   $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_queue_manager           = $facts['os_service_default'],
+  $rabbit_stream_fanout               = $facts['os_service_default'],
   $rabbit_enable_cancel_on_failover   = $facts['os_service_default'],
   $rabbit_use_ssl                     = $facts['os_service_default'],
   $service_down_time                  = $facts['os_service_default'],
@@ -294,6 +304,8 @@ class mistral(
     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,
+    use_queue_manager               => $rabbit_use_queue_manager,
+    rabbit_stream_fanout            => $rabbit_stream_fanout,
     enable_cancel_on_failover       => $rabbit_enable_cancel_on_failover,
   }
 
Index: puppet-module-mistral/releasenotes/notes/queue_manager-and-stream_fanout-e9cc205e808d7e1e.yaml
===================================================================
--- /dev/null
+++ puppet-module-mistral/releasenotes/notes/queue_manager-and-stream_fanout-e9cc205e808d7e1e.yaml
@@ -0,0 +1,5 @@
+---
+features:
+  - |
+    The ``mistral`` class now has two new parameters
+    ``rabbit_use_queue_manager`` and ``rabbit_stream_fanout``.
Index: puppet-module-mistral/spec/classes/mistral_init_spec.rb
===================================================================
--- puppet-module-mistral.orig/spec/classes/mistral_init_spec.rb
+++ puppet-module-mistral/spec/classes/mistral_init_spec.rb
@@ -58,6 +58,8 @@ describe 'mistral' do
           :rabbit_quorum_delivery_limit    => '<SERVICE DEFAULT>',
           :rabbit_quorum_max_memory_length => '<SERVICE DEFAULT>',
           :rabbit_quorum_max_memory_bytes  => '<SERVICE DEFAULT>',
+          :use_queue_manager               => '<SERVICE DEFAULT>',
+          :rabbit_stream_fanout            => '<SERVICE DEFAULT>',
           :enable_cancel_on_failover       => '<SERVICE DEFAULT>',
         )
         is_expected.to contain_mistral_config('openstack_actions/os_actions_endpoint_type').with(
