activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Timothy Bish <tabish...@gmail.com>
Subject Re: How to send a textMessage to an exising queue (destination)
Date Fri, 29 Apr 2011 14:48:30 GMT
On Fri, 2011-04-29 at 07:42 -0700, mruan wrote:
> Something like this:
> 
> f(string &queuename, string &text)
> {
> ...
>     if (queueName Existing)  // is it possible to check if a queue exists in
> the session???
>        destination = session->createQueue( queueName );
>     else
> // queue does not exist, something wrong
>        return;
> 
>     producer = session->createProducer( destination );
>     TextMessage* message = session->createTextMessage( textA );
>     producer->send(message);
> ...
> } 
> 
> --
> View this message in context: http://activemq.2283324.n4.nabble.com/How-to-send-a-textMessage-to-an-exising-queue-destination-tp3481137p3483843.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.

You could subscribe to advisory messages and track what exists on the
broker in you code somewhere.  Or just cache the destination you created
once and reuse that from then on, really up to you how you manage your
requirements in this area.

See: http://activemq.apache.org/advisory-message.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


Mime
View raw message