diff --git a/manifests/init.pp b/manifests/init.pp index 775f804..eaf4bde 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -72,6 +72,11 @@ # (Optional) Limit the number of memory bytes used by the quorum queue. # 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. +# Defaults to $facts['os_service_default'] +# # [*rabbit_transient_queues_ttl*] # (Optional) Positive integer representing duration in seconds for # queue TTL (x-expires). Queues which are unused for the duration @@ -190,6 +195,7 @@ class watcher ( $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_enable_cancel_on_failover = $facts['os_service_default'], $rabbit_transient_queues_ttl = $facts['os_service_default'], $rabbit_heartbeat_timeout_threshold = $facts['os_service_default'], $kombu_ssl_ca_certs = $facts['os_service_default'], @@ -249,6 +255,7 @@ class watcher ( 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, + enable_cancel_on_failover => $rabbit_enable_cancel_on_failover, rabbit_transient_queues_ttl => $rabbit_transient_queues_ttl, heartbeat_timeout_threshold => $rabbit_heartbeat_timeout_threshold, heartbeat_rate => $rabbit_heartbeat_rate, diff --git a/releasenotes/notes/enable_cancel_on_failover-aae8980cb5401411.yaml b/releasenotes/notes/enable_cancel_on_failover-aae8980cb5401411.yaml new file mode 100644 index 0000000..5b23f8e --- /dev/null +++ b/releasenotes/notes/enable_cancel_on_failover-aae8980cb5401411.yaml @@ -0,0 +1,5 @@ +--- +features: + - | + The new ``watcher::rabbit_enable_cancel_on_failover`` parameter has been + added. diff --git a/spec/classes/watcher_init_spec.rb b/spec/classes/watcher_init_spec.rb index e2a4b57..e8ef451 100644 --- a/spec/classes/watcher_init_spec.rb +++ b/spec/classes/watcher_init_spec.rb @@ -51,6 +51,7 @@ describe 'watcher' do :rabbit_quorum_delivery_limit => '', :rabbit_quorum_max_memory_length => '', :rabbit_quorum_max_memory_bytes => '', + :enable_cancel_on_failover => '', :rabbit_retry_interval => '', ) is_expected.to contain_oslo__messaging__notifications('watcher_config').with( @@ -81,6 +82,7 @@ describe 'watcher' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :rabbit_enable_cancel_on_failover => false, :rabbit_heartbeat_timeout_threshold => '60', :rabbit_heartbeat_rate => '10', :rabbit_heartbeat_in_pthread => true, @@ -119,6 +121,7 @@ describe 'watcher' do :rabbit_quorum_delivery_limit => 3, :rabbit_quorum_max_memory_length => 5, :rabbit_quorum_max_memory_bytes => 1073741824, + :enable_cancel_on_failover => false, :rabbit_retry_interval => '', ) is_expected.to contain_oslo__messaging__notifications('watcher_config').with(