diff --git a/kombu/common.py b/kombu/common.py index 47d2a59d4..d5d4e0dce 100644 --- a/kombu/common.py +++ b/kombu/common.py @@ -87,7 +87,7 @@ class Broadcast(Queue): def __init__(self, name=None, queue=None, auto_delete=True, exchange=None, alias=None, **kwargs): - queue = queue or 'bcast.{0}'.format(uuid()) + queue = '{0}.{1}'.format(queue or 'bcast', uuid()) return super(Broadcast, self).__init__( alias=alias or name, queue=queue, diff --git a/t/unit/test_common.py b/t/unit/test_common.py index 9cc30d154..a72416139 100644 --- a/t/unit/test_common.py +++ b/t/unit/test_common.py @@ -80,11 +80,11 @@ def test_arguments(self): assert q.exchange.type == 'fanout' q = Broadcast('test_Broadcast', 'explicit_queue_name') - assert q.name == 'explicit_queue_name' + assert q.name.startswith('explicit_queue_name.') assert q.exchange.name == 'test_Broadcast' q2 = q(Mock()) - assert q2.name == q.name + assert q2.name.split('.')[0] == q.name.split('.')[0] class test_maybe_declare: