activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guillermolalsacien <>
Subject Dynamic Topic or just Temporary topic ?
Date Tue, 04 Apr 2006 10:03:48 GMT

I need to create Topics dynamically with the following code:

Topic topic = null;
connectionFactory = new ActiveMQConnectionFactory( PROVIDER_URL  );
Connection connection = connectionFactory.createConnection();
Session s = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);        
topic = s.createTopic(name);

I have checked in the JConsole that the topic was succesfully created.
I run this code in another to machine to locate the Topic:

Topic topic = (Topic) ctx.lookup("dynamicTopics/" + name);

It also works fine, the problem is that when I stop the broker the Topic
isn't there once restarted.

So my question is what is the difference between a temporary topic and this
kind of topic ? How can I create and share a dynamic topic and make it last

I've also seen in the documents that it is possible to bind destinations in
the JNDI context like other JMS providers do, but since it is a
ReadOnlyContext how should I do that ?
View this message in context:
Sent from the ActiveMQ - User forum at

View raw message