activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mruan <>
Subject How to send a textMessage to an exising queue (destination)
Date Thu, 28 Apr 2011 14:19:41 GMT
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

“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:
Sent from the ActiveMQ - User mailing list archive at

View raw message