[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: I54b7681b059991eafe5899b3d0cffdcd5c80fb39
Closes-Bug: #1620545
This commit is contained in:
LiuNanke 2016-09-20 15:31:48 +08:00
parent 835a6a4f18
commit 77416f25e0
2 changed files with 3 additions and 3 deletions

View File

@ -64,7 +64,7 @@ class EngineService(service.Service):
SchemaEndpoint()
]
transport = messaging.get_transport(CONF)
transport = messaging.get_notification_transport(CONF)
s_target = target.Target('murano', 'tasks', server=str(uuid.uuid4()))
self.server = messaging.get_rpc_server(
transport, s_target, endpoints, 'eventlet')

View File

@ -57,7 +57,7 @@ class EngineClient(object):
def api():
global TRANSPORT
if TRANSPORT is None:
TRANSPORT = messaging.get_transport(CONF)
TRANSPORT = messaging.get_notification_transport(CONF)
return ApiClient(TRANSPORT)
@ -65,6 +65,6 @@ def api():
def engine():
global TRANSPORT
if TRANSPORT is None:
TRANSPORT = messaging.get_transport(CONF)
TRANSPORT = messaging.get_notification_transport(CONF)
return EngineClient(TRANSPORT)