activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From go canal <goca...@yahoo.com>
Subject dynamic topic and listener
Date Sun, 11 Apr 2010 06:04:20 GMT
Hello,
googled but still can not get detailed enough info.

my use case is that a chat room needs to be dynamically created, so a dynamic listener.

how do I do this in Java ?

http://activemq.apache.org/how-do-i-create-new-destinations.html mentioned that we can use
session.createTopic() to create a dynamic topic. So I assume that we can first have a static
queue newChatRoom, with a listener who will create the dynamic topic:
public void onMessage(Message message, Session session) throws JMSException {
Topic topic = session.createTopic ("newTopic");
}


But how do I register a new listener for this dynamic topic ?
Another question, how do I delete the topic when all people left the room ?
rgds,
canal



      
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message