Add NOTIFIER message topic can be specified by configuration file.
Change-Id: Ia348507343b561622d8d8e3c5fa0644e521a2edd Signed-off-by: Yuanbin.Chen <cybing4@gmail.com>
This commit is contained in:
parent
f143759f0f
commit
66b4ead3b5
|
@ -206,6 +206,13 @@ notification_opts = [
|
|||
cfg.CONF.register_group(notification_group)
|
||||
cfg.CONF.register_opts(notification_opts, group=notification_group)
|
||||
|
||||
# Notification topic
|
||||
notification_topic_opts = [
|
||||
cfg.ListOpt('notification_topics',
|
||||
default=['versioned_notifications'],
|
||||
help=_('Default notification topic.'))]
|
||||
cfg.CONF.register_opts(notification_topic_opts)
|
||||
|
||||
# Zaqar group
|
||||
zaqar_group = cfg.OptGroup(
|
||||
'zaqar', title='Zaqar Options',
|
||||
|
|
|
@ -94,7 +94,7 @@ def setup(url=None, optional=False):
|
|||
serializer = RequestContextSerializer(JsonPayloadSerializer())
|
||||
NOTIFIER = messaging.Notifier(NOTIFICATION_TRANSPORT,
|
||||
serializer=serializer,
|
||||
topics=['versioned_notifications'])
|
||||
topics=cfg.CONF.notification_topics)
|
||||
|
||||
|
||||
def cleanup():
|
||||
|
|
Loading…
Reference in New Issue