From c188b5cd121d9637c054d2ee593356dceb6fd58d Mon Sep 17 00:00:00 2001 From: kbespalov Date: Mon, 5 Sep 2016 17:18:15 +0300 Subject: [PATCH] [messaging] Using get_notification_transport() We should separate transports for the RPC and Notifiers in order to have a possibility of using different messaging configurations, like rabbit for RPC and kafka for notifications. e.g. [DEFAULT] rpc_backend = rabbit [oslo_messaging_rabbit] rabbit_hosts = ... rabbit_password = ... rabbit_userid = ... [oslo_messaging_notifications] driver = ... transport_url = kafka://... topics = ... Change-Id: I965fdb4bb1883d05c43766cf12d620d7ab038e36 Closes-Bug: #1620545 --- murano/common/server.py | 2 +- murano/engine/system/status_reporter.py | 3 ++- .../notes/configure-notifications-0c84a5085c25f6e7.yaml | 6 ++++++ 3 files changed, 9 insertions(+), 2 deletions(-) create mode 100644 releasenotes/notes/configure-notifications-0c84a5085c25f6e7.yaml diff --git a/murano/common/server.py b/murano/common/server.py index 2dce6618..88013733 100644 --- a/murano/common/server.py +++ b/murano/common/server.py @@ -226,7 +226,7 @@ class NotificationService(Service): def start(self): endpoints = [report_notification, track_instance, untrack_instance] - transport = messaging.get_transport(CONF) + transport = messaging.get_notification_transport(CONF) s_target = target.Target(topic='murano', server=str(uuid.uuid4())) self.server = messaging.get_notification_listener( diff --git a/murano/engine/system/status_reporter.py b/murano/engine/system/status_reporter.py index b7e32d61..cd52cfbd 100644 --- a/murano/engine/system/status_reporter.py +++ b/murano/engine/system/status_reporter.py @@ -31,7 +31,8 @@ class StatusReporter(object): def __init__(self, environment): if StatusReporter.transport is None: - StatusReporter.transport = messaging.get_transport(CONF) + StatusReporter.transport = messaging.get_notification_transport( + CONF) self._notifier = messaging.Notifier( StatusReporter.transport, publisher_id=uuidutils.generate_uuid(), diff --git a/releasenotes/notes/configure-notifications-0c84a5085c25f6e7.yaml b/releasenotes/notes/configure-notifications-0c84a5085c25f6e7.yaml new file mode 100644 index 00000000..d4c67926 --- /dev/null +++ b/releasenotes/notes/configure-notifications-0c84a5085c25f6e7.yaml @@ -0,0 +1,6 @@ +features: + - It is now possible to configure the notifications to use a different + transport URL than the RPCs. These could potentially be completely + different message broker hosts (though they doesn't need to be). If the + notification-specific configuration is not provided, the notifier will use + the same transport as the RPCs. \ No newline at end of file