Return-Path: X-Original-To: apmail-activemq-users-archive@www.apache.org Delivered-To: apmail-activemq-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 963C53CD3 for ; Thu, 28 Apr 2011 14:27:36 +0000 (UTC) Received: (qmail 97343 invoked by uid 500); 28 Apr 2011 14:27:36 -0000 Delivered-To: apmail-activemq-users-archive@activemq.apache.org Received: (qmail 97319 invoked by uid 500); 28 Apr 2011 14:27:36 -0000 Mailing-List: contact users-help@activemq.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@activemq.apache.org Delivered-To: mailing list users@activemq.apache.org Received: (qmail 97311 invoked by uid 99); 28 Apr 2011 14:27:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Apr 2011 14:27:36 +0000 X-ASF-Spam-Status: No, hits=3.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,RFC_ABUSE_POST,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,URI_HEX X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of tabish121@gmail.com designates 209.85.220.171 as permitted sender) Received: from [209.85.220.171] (HELO mail-vx0-f171.google.com) (209.85.220.171) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 28 Apr 2011 14:27:29 +0000 Received: by vxc40 with SMTP id 40so2830850vxc.2 for ; Thu, 28 Apr 2011 07:27:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:subject:from:to:in-reply-to:references :content-type:date:message-id:mime-version:x-mailer :content-transfer-encoding; bh=nyLUkSi+N2dI7C5woD7vpVn5aRrlo6D5t/VZvD/GmDM=; b=Iygo2JO45lp1bDoLUKon2fjhEx7jFCAiLbGpSWootlIPBw28vdAp33L4owiGKgVvk+ Ma/ovoEG3irKhNl47wUPiNBBhxtd1VSJzHBq5sANfAYnsILa5pKvv8mOyyGem1Ez2jeq JytxtHwne1ytYqgQjIt43DTpuWcGnSa7Uy+Fw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=subject:from:to:in-reply-to:references:content-type:date:message-id :mime-version:x-mailer:content-transfer-encoding; b=mWVt9EHcmPwWUt0iZShKeKF7uinTr7y8UhIykJH0kDEvZRTGLAsGH/25oKJfX3VPyF xdgKZvpwTsmxi4oy0UHPb5jtKILR6C8zXjd2UqTOJWOt97aNUoerMYNabI37PEwjM8Vg BNbCvkJPn7Jf9pp5LQetSVSMLzv4nZiyL5Tf4= Received: by 10.52.180.234 with SMTP id dr10mr5250445vdc.124.1304000828242; Thu, 28 Apr 2011 07:27:08 -0700 (PDT) Received: from [192.168.2.150] (c-98-231-181-148.hsd1.va.comcast.net [98.231.181.148]) by mx.google.com with ESMTPS id b6sm392357vci.24.2011.04.28.07.27.06 (version=SSLv3 cipher=OTHER); Thu, 28 Apr 2011 07:27:07 -0700 (PDT) Subject: Re: How to send a textMessage to an exising queue (destination) From: Timothy Bish To: users@activemq.apache.org In-Reply-To: <1304000381372-3481137.post@n4.nabble.com> References: <1304000381372-3481137.post@n4.nabble.com> Content-Type: text/plain; charset="UTF-8" Date: Thu, 28 Apr 2011 10:27:06 -0400 Message-ID: <1304000826.2757.4.camel@office> Mime-Version: 1.0 X-Mailer: Evolution 2.32.2 (2.32.2-1.fc14) Content-Transfer-Encoding: 8bit X-Virus-Checked: Checked by ClamAV on apache.org On Thu, 2011-04-28 at 07:19 -0700, mruan wrote: > I’m new here! > > I am using activeMQ-CPP to develop an application in C++. > > As you may know that we can send a textMessage to an queue, in most case we > use the following code: > > > - Destination *destination = session->createQueue("queueName"); > > - MessageProducer *producer = session->createProducer(destination); > > - TextMessage *message = session->createTextMessage( "some text"); > > - Producer->send(message); > > My question is: how can we send a textMessage to an existing queue > (destination)? In other words: the queue ("queueName") exists already, and > it must NOT be created again! So I just want to send a textMessage to it > without first to create it. > > Thanks in advance > > Ming > P.S. > “If the queue exist, messages are sent to the same queue "queueName", what > are your symptons?” > >  Then we see the messages arrived indeed in the queue “queueName”, that > will be OK in this case. > > The trouble is when the queue “queueName” does NOT exist, a new queue named > “queueName” will be created and this is NOT what I want! > I want that in this case the program will return me a “null” point so that I > know that there are something wrong. > > Our project demands that no new queues maybe created. > > > > > -- > View this message in context: http://activemq.2283324.n4.nabble.com/How-to-send-a-textMessage-to-an-exising-queue-destination-tp3481137p3481137.html > Sent from the ActiveMQ - User mailing list archive at Nabble.com. See this entry from the FAQ: http://activemq.apache.org/how-do-i-restrict-connections-from-creating-new-queues-or-topics.html Regards -- Tim Bish ------------ FuseSource Email: tim.bish@fusesource.com Web: http://fusesource.com Twitter: tabish121 Blog: http://timbish.blogspot.com/ Connect at CamelOne May 24-26 The Open Source Integration Conference