(Migrated) Feature Request: AMQP - auto-generated queue

(This message has been automatically imported from the retired mailing list)

When creating a channel, zato has a mandatory field to specify the queue
name.

I would like the ability to create an ‘exclusive’ queue using a
user-provided template along with an exchange to bind to. As an example:
‘myconn’ + guid. -> myConnectorExchange.

Code example:

Generate a (hopefully) unique queue name

    self.queue_name = '{}.{}'.format(
        self.queue_prefix,
        str(uuid.uuid4()).replace('-', '')

Create the queue

    self.queue = self.channel.queue_declare(
        callback=self.on_queue_declare,
        queue=self.queue_name,
        passive=False,
        durable=False,
        exclusive=True,
        auto_delete=True,
        nowait=False,
        arguments=dict()

This approach provides unique queue name (within the limits of uuid.uuid4)
that can be prefixed. When the client disconnects, the queue is
automatically deleted on the server. The queue is ‘exclusive’ so that
other clients cannot bind to it.

On 24/03/15 16:54, Michael Dyer wrote:

When creating a channel, zato has a mandatory field to specify the queue
name.

I would like the ability to create an ‘exclusive’ queue using a
user-provided template along with an exchange to bind to. As an
example: ‘myconn’ + guid. -> myConnectorExchange.

This is interesting, can you please translate it into a code snippet,
in any language, achieving the desired effect?

Doesn’t have to be a full self-contained example, just something a bit
more concrete. I understand the idea of exclusive queues but am not
certain about templates and how to read the example.

thanks a lot,