Unhardcode keystone listener topic
Change-Id: Icc74d5e9327e3cf298ce96194920d4b922d4a07a
Related-Issue: PROD-31028
diff --git a/README.rst b/README.rst
index c7cf95c..eec3a6d 100644
--- a/README.rst
+++ b/README.rst
@@ -150,13 +150,21 @@
notification processing error. Enable this only when underlying transport
supports this feature.
-`ks_notifications_pool_name` allows to use keystone listener together with
-other applications listening on the same notifications topic without
-interference between services. Set it to any distinctive value to enable
-listener pooling. It is enabled by default with pool name 'barbican'.
+`ks_notifications_topic` (defaults to 'notifications') allows to set
+name of the topic to listen for Keystone notifications on. Note that Keystone
+must also be configured to send notifications to this topic.
+If Barbican version and messaging back end support listener pooling,
+it is preferable to leave this value as default and use
+`ks_notifications_pool_name` (see below).
+
+`ks_notifications_pool_name` (Since Pike release) allows to use keystone
+listener together with other applications listening on the same notifications
+topic without interference between services.
+Set it to any distinctive value to enable listener pooling.
+It is enabled by default with pool name 'barbican'.
Disable it (by setting to empty string) only if underlying messaging transport
-does supports this feature or Barbican is the sole service listening for
-notifications on 'notifications' topic.
+does not support this feature or Barbican is the sole service listening for
+notifications on `ks_notifications_topic` (default is 'notifications') topic.
.. code-block:: yaml
diff --git a/barbican/files/ocata/barbican.conf.Debian b/barbican/files/ocata/barbican.conf.Debian
index 0c17305..3564a43 100644
--- a/barbican/files/ocata/barbican.conf.Debian
+++ b/barbican/files/ocata/barbican.conf.Debian
@@ -264,7 +264,7 @@
# of the servers in a round-robin fashion. That's why Barbican service should
# have its own dedicated notification queue so that it receives all of Keystone
# notifications.
-topic = 'notifications'
+topic = {{ server.get('ks_notifications_topic', 'notifications') }}
# True enables requeue feature in case of notification processing error.
# Enable this only when underlying transport supports this feature.
diff --git a/barbican/files/pike/barbican.conf.Debian b/barbican/files/pike/barbican.conf.Debian
index 99c9a04..330b83b 100644
--- a/barbican/files/pike/barbican.conf.Debian
+++ b/barbican/files/pike/barbican.conf.Debian
@@ -297,7 +297,7 @@
# Alternatively if the chosen oslo.messaging backend
# supports listener pooling (for example rabbitmq), setting a non-
# default 'pool_name' option should be preferred. (string value)
-topic = 'notifications'
+topic = {{ server.get('ks_notifications_topic', 'notifications') }}
# Pool name for notifications listener. Setting this to a distinctive
# value will allow barbican notifications listener to receive its own
diff --git a/barbican/files/queens/barbican.conf.Debian b/barbican/files/queens/barbican.conf.Debian
index af8b05c..6c19844 100644
--- a/barbican/files/queens/barbican.conf.Debian
+++ b/barbican/files/queens/barbican.conf.Debian
@@ -248,7 +248,7 @@
# Alternatively if the chosen oslo.messaging backend
# supports listener pooling (for example rabbitmq), setting a non-
# default 'pool_name' option should be preferred. (string value)
-#topic = notifications
+topic = {{ server.get('ks_notifications_topic', 'notifications') }}
# Pool name for notifications listener. Setting this to a distinctive
# value will allow barbican notifications listener to receive its own
diff --git a/barbican/files/rocky/barbican.conf.Debian b/barbican/files/rocky/barbican.conf.Debian
index b970c8b..c90884e 100644
--- a/barbican/files/rocky/barbican.conf.Debian
+++ b/barbican/files/rocky/barbican.conf.Debian
@@ -242,7 +242,7 @@
# Alternatively if the chosen oslo.messaging backend
# supports listener pooling (for example rabbitmq), setting a non-
# default 'pool_name' option should be preferred. (string value)
-#topic = notifications
+topic = {{ server.get('ks_notifications_topic', 'notifications') }}
# Pool name for notifications listener. Setting this to a distinctive
# value will allow barbican notifications listener to receive its own