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.b...@fusesource.com Web: http://fusesource.com Twitter: tabish121 Blog: http://timbish.blogspot.com/ Connect at CamelOne May 24-26 The Open Source Integration Conference