Log a warning when connected to a routable message bus

Newton will be the first release of support for this new message bus
technology.  Make users aware that this feature is 'bleeding edge' and
queuing is not supported in this release.

Change-Id: I44ba5507d941823e2dfa92d52dae4b85e9bda493
This commit is contained in:
Kenneth Giusti 2016-08-04 18:25:50 -04:00
parent 1bf6eeaaf9
commit 3109941e5e
2 changed files with 14 additions and 2 deletions
oslo_messaging/_drivers

@ -33,7 +33,9 @@ that traffic can be partitioned based on its use.
"""
import abc
import logging
from oslo_messaging._i18n import _LW
from oslo_messaging.target import Target
__all__ = [
@ -46,6 +48,8 @@ __all__ = [
SERVICE_RPC = 0
SERVICE_NOTIFY = 1
LOG = logging.getLogger(__name__)
def keyify(address, service=SERVICE_RPC):
"""Create a hashable key from a Target and service that will uniquely
@ -256,6 +260,16 @@ class AddresserFactory(object):
# to qpidd or we cannot identify the message bus. This can be
# overridden via the configuration.
product = remote_properties.get('product', 'qpid-cpp')
# TODO(kgiusti): Router support was added in Newton. Remove this
# warning post Newton, once the driver has stabilized.
if product == "qpid-dispatch-router":
w = _LW("This is the initial release of support for message"
" routing technology. Be aware that messages are not"
" queued and may be discarded if there are no consumers"
" present.")
LOG.warning(w)
if self._mode == 'legacy' or (self._mode == 'dynamic'
and product == 'qpid-cpp'):
return LegacyAddresser(self._default_exchange,

@ -198,8 +198,6 @@ class ProtonDriver(base.BaseDriver):
def __init__(self, conf, url,
default_exchange=None, allowed_remote_exmods=[]):
# TODO(kgiusti) Remove once driver fully stabilizes:
LOG.warning(_LW("Support for the 'amqp' transport is EXPERIMENTAL."))
if proton is None or controller is None:
raise NotImplementedError("Proton AMQP C libraries not installed")