Return-Path: Delivered-To: apmail-geronimo-activemq-users-archive@www.apache.org Received: (qmail 79972 invoked from network); 19 Dec 2006 12:10:50 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 19 Dec 2006 12:10:50 -0000 Received: (qmail 33039 invoked by uid 500); 19 Dec 2006 12:10:57 -0000 Delivered-To: apmail-geronimo-activemq-users-archive@geronimo.apache.org Received: (qmail 33023 invoked by uid 500); 19 Dec 2006 12:10:57 -0000 Mailing-List: contact activemq-users-help@geronimo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: activemq-users@geronimo.apache.org Delivered-To: mailing list activemq-users@geronimo.apache.org Received: (qmail 33014 invoked by uid 99); 19 Dec 2006 12:10:57 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Dec 2006 04:10:57 -0800 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of lists@nabble.com designates 72.21.53.35 as permitted sender) Received: from [72.21.53.35] (HELO talk.nabble.com) (72.21.53.35) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 19 Dec 2006 04:10:46 -0800 Received: from [72.21.53.38] (helo=jubjub.nabble.com) by talk.nabble.com with esmtp (Exim 4.50) id 1Gwdnd-0003Fv-Su for activemq-users@geronimo.apache.org; Tue, 19 Dec 2006 04:10:25 -0800 Message-ID: <7945961.post@talk.nabble.com> Date: Tue, 19 Dec 2006 04:10:25 -0800 (PST) From: bhartsb To: activemq-users@geronimo.apache.org Subject: Re: Exact symantics of creating queues In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Nabble-From: bhartsb@cox.net References: <7888482.post@talk.nabble.com> X-Virus-Checked: Checked by ClamAV on apache.org Hi James, Per the FAQ item you reference, and where it says in the blue box: "Note that the ActiveMQ Broker will only create server side resources for destinations when messages are actually sent to them. So you can create as many instances of ActiveMQTopic and ActiveMQQueue on a client without any real overhead until you actually send messages to them on a broker. So a JMS client creating a new ActiveMQQueue POJO does not mean you are creating server side queue resources." James, if this is the case then why does method # 4 below create a queue? It seems to be inconsistent behaviour on the part of AMQ. Further it is my own oppinion that correct semantics is such that "creating" a queue indeed creates a queue resource on the server. Sending a msg to a queue shouldn't create the queue...that is akin to saying sending a letter "creates the mailbox" or creates the "post office". It is VERY confusing to have function/method names that imply they do something that they aren't doing. James.Strachan wrote: > > See this FAQ entry > > http://incubator.apache.org/activemq/how-do-i-create-new-destinations.html > > On 12/15/06, Avinash wrote: >> >> Hi All, >> >> We have an AMQ Broker [4.2. incubator SNAPSHOT] running as a standalone >> java >> application. >> >> When we are connecting the AMQ Broker and trying to creating queues, we >> followed the following scenario. >> >> [1] Clients connects to AMQ Broker by passing proper credentials. >> [2] After successful connection client will create a queue. >> >> When creating queues various methods are used as follows: >> [1] Create queue by passing the queuename to session object as : >> session.createQueue(queuename); >> [2] Create a queue by creating an instance of ActiveMQQueue as : >> ActiveMQQueue queue = new ActiveMQQueue(queuename); >> [3] Create a queue by creating an instance of ActiveMQQueue and pass it >> as >> an parameter to message producer >> as : >> MessageProducer producer = session.createProducer(new >> ActiveMQQueue(queuename)); >> [4] Create a queue by creating an instance of ActiveMQQueue and pass it >> as >> an parameter to message consumer >> as : >> MessageConsumer consumer = session.createConsumerr(new >> ActiveMQQueue(queuename)); >> >> While in first three[1,2,3] cases no exception is generated at both the >> sides, but the queues are not created. In case [4] when tried to create >> the >> queue by passing an instance of ActiveMQQueue to the consumer, the queues >> are getting created at AMQ Broker. >> >> My question is exactly which symantics is required to follow while >> creating >> the queues? >> >> Thanks in advance. >> >> Avinash >> >> -- >> View this message in context: >> http://www.nabble.com/Exact-symantics-of-creating-queues-tf2826002.html#a7888482 >> Sent from the ActiveMQ - User mailing list archive at Nabble.com. >> >> > > > -- > > James > ------- > http://radio.weblogs.com/0112098/ > > -- View this message in context: http://www.nabble.com/Exact-symantics-of-creating-queues-tf2826002.html#a7945961 Sent from the ActiveMQ - User mailing list archive at Nabble.com.