Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1EB691079F for ; Wed, 7 Aug 2013 21:27:50 +0000 (UTC) Received: (qmail 76788 invoked by uid 500); 7 Aug 2013 21:27:49 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 76753 invoked by uid 500); 7 Aug 2013 21:27:49 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 76745 invoked by uid 99); 7 Aug 2013 21:27:49 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Aug 2013 21:27:49 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW X-Spam-Check-By: apache.org Received-SPF: error (athena.apache.org: local policy) Received: from [209.85.216.51] (HELO mail-qa0-f51.google.com) (209.85.216.51) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 07 Aug 2013 21:27:43 +0000 Received: by mail-qa0-f51.google.com with SMTP id f11so1346984qae.10 for ; Wed, 07 Aug 2013 14:27:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; bh=4TiNhOuv7m8L+k/wqfTjViOmF9KcyiJacyW7YvkBdf0=; b=GyyT8HHE/IsydYdukaIHlbx8k3bR/yMwi3DvNWoT1MB2HeCT9j3KRR+u1nbGzR668m FXlK0xfq2MUdCYyl3IpuXOG8dMFKzvZA69EciQagDWEDR/GD7l/vmHoErrIK+az3+fbI QaHL1hcn0b9WhuabiFrnHkjlH20zts90+nMG3BrZ3HmHNwFwwX0wI3NY15CigNyIH/do TKXVROaXhq2a26/cyf0RiuhkeXKMm3fiv8JtXCSQVagOXKQFFFfBUJKrfLVUMknx6sFA TIgUtavYt2m8LaWFuJqR8j33CY6ZvpIsCMhiVdbJJ+haRlwZngsGHCWxp3pvbDmnE/bM PWEQ== X-Gm-Message-State: ALoCoQl9qQx2eJzmp+ule3vabGkKonn1acl+rKubJ+SVIE4zx4Z4/EucKYKcWI3L7d517zVrFeIq MIME-Version: 1.0 X-Received: by 10.49.129.228 with SMTP id nz4mr2692568qeb.77.1375910821770; Wed, 07 Aug 2013 14:27:01 -0700 (PDT) Received: by 10.49.26.42 with HTTP; Wed, 7 Aug 2013 14:27:01 -0700 (PDT) X-Originating-IP: [89.102.141.161] In-Reply-To: <520266D8.1030301@redhat.com> References: <520266D8.1030301@redhat.com> Date: Wed, 7 Aug 2013 23:27:01 +0200 Message-ID: Subject: Re: Creating a queue and bindings from an address in qpid.messaging / AMQP 1.0 From: Jakub Scholz To: users@qpid.apache.org Content-Type: multipart/alternative; boundary=047d7b6da2e6c64a1c04e3623304 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b6da2e6c64a1c04e3623304 Content-Type: text/plain; charset=ISO-8859-1 Hi Gordon, Thanks for your answer ... On Wed, Aug 7, 2013 at 5:25 PM, Gordon Sim wrote: > On 08/07/2013 03:34 PM, Jakub Scholz wrote: > >> Is there some way how to >> - create a queue with some specific options >> > > Yes. > > To begin with, there are two ways in which a node can be created. One is > the usual 'create' option. Over 1.0 however this will tie you to qpidd as > there is no standard way to have a node created _with_a_ specific_name_ in > response to attachment of a link. > > The other is to set the node name in the address to '#' (i.e. a single > pound or hash character). This form uses a standard AMQP 1.0 mechanism and > so is recommended for things like dynamically created response queues. The > broker will assign a name, and that can be retrieved after the > receiver/sender is established via Receiver::getAddress()/ > Sender::getAddress(). > > To set specific options for the node you can put them in a properties map > in the *node*. The x-declare in the node is recognised as well to ease > transition. > > I assume you meant something like this: myresponse_queue_1; { create: always, assert: never, node: { durable: false, properties: { auto-delete: true, exclusive: true, 'qpid.max_count': 1000, 'qpid.max_size': 1000000, 'qpid.policy_type': ring } } } That indeed seems to be working. Although, interestingly enough the auto-delete queue doesn't autodelete with AMQP 1.0 & exclusive=true (0.24 RC1). Is taht a known problem or should I enter JIRA? > > - bind a queue from the address? >> > > The only way to do this through addressing is where the node is an > exchange and you are creating a receiver. In this case a queue will be > automatically created and bound. > > However, there is no obvious way to pass configuration for this > subscription queue. So in qpidd I have created the concept of a 'topic'. A > topic is an exchange along with some default subscription queue settings. > You create one of these using QMF or a command line tool (such as qpidt > under tests in svn) and then you use that as the node name to your receiver. > > The name of the subscription queue is formed by joining the container-id > of the connection and the link name (both default to UUIDs, both can be set > to anything you like, but each link must have a unique name within the > scope of the container-id). > > So, if I understand you correctly, we can't have both in one address. Either custom queue or the binding, right? I have to say that the concept of topics is definitely interesting. I have to think about how to utilize it in our setup. > Or is the only option to first create the queue & binding >> using QMF? >> >> I assume the second might be where the legacy filters might help. But I >> have no idea how to use them and there don't seem to be much documentation >> > > For direct and topic exchanges controlling the binding is simple. It can > be done through the subject in the address. So creating a receiver with > address my-exchange/my-key will bind the subscription queue to my-exchange > with my-key. > > As above, and assuming you are using qpidd, in order to configure the > subscription queue you need to create a topic, e.g. > > qpidt create topic my-topic exchange=response qpid.max_count=1000 > qpid.max_size=1000000 qpid.policy_type=ring > > and then create the receiver using e.g.: > > my-topic/response.ABCFR_**ABCFRALMMACC1.response_queue_1 > > The act of creating a receiver will create the subscription queue using > the defaults specified for the topic and then that queue will be bound to > the response exchange using the key 'response.ABCFR_ABCFRALMMACC1.** > response_queue_1'. > > You can specify the name of the link in the address if desired, but unlike > in 0-10, this will only form part of the name of the queue. It will be > prefixed with the container-id (since AMQP 1.0 requires that combination to > uniquely identify the link). The container-id can be specified as a > connection option. > > Does this make sense? > > This aspect is a bit unfortunate. Since we are running the broker with many customers connected, we need to have a clear distinction which queue belongs to which customer. Naming thinks after UUIDs isn't much useful here. It would be great to be able to better configure this - for example by setting some prefix based on the authenticated user name. I noticed one more bug - trying to delete a non-existent topic with qpidt seems to crash the broker. I guess I can enter a JIRA for that as well, or? Thanks & Regards Jakub --047d7b6da2e6c64a1c04e3623304--