activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Antsa <>
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"
           <amq:topic id="directory" name="ChangePassword"

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

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

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

            Session session = connection.createSession(transacted,
            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?


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message