activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antsa <...@teamware.com>
Subject How to discover destinations configured in a broker
Date Fri, 13 Mar 2009 00:16:37 GMT

I'm a newbie to JMS.  I have an embedded broker configured in my Spring XML
config running inside my app.

    <amq:broker brokerName="twoBroker"
dataDirectory="${activemq.base}/data">
       <amq:destinations>
           <amq:topic id="directory" name="ChangePassword"
physicalName="directory.user.changepassword"/>
       </amq:destinations>

        <amq:transportConnectors>
            <amq:transportConnector name="openwire"
uri="tcp://localhost:61616" discoveryUri="multicast://default"/>
            <amq:transportConnector name="vm" uri="vm://twoBroker"/>
        </amq:transportConnectors>
    </amq:broker>

My app is acting as a messaging gateway, receiving non JMS messages from
another system and I'm trying to then put these messages to their JMS topic
destinations.

I'm just using similar code to the ProducerTool example, e.g.

            Session session = connection.createSession(transacted,
Session.AUTO_ACKNOWLEDGE);
            destination = session.createTopic(subject);

but I know I should not be using createTopic() in my real app.  So, how do I
find out what destinations the broker supports and get the Destination
object to procuce the message to.  This is both a local (same vm) and remote
vm issue.

Do I have to use JNDI or is there some other magic that makes this easy?

Thanks
Antony

-- 
View this message in context: http://www.nabble.com/How-to-discover-destinations-configured-in-a-broker-tp22487877p22487877.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message