0 Replies Latest reply on Mar 13, 2009 1:26 PM by Abed Gham

    Distributed Topics

    Abed Gham Newbie

      Hi all,

      I have a small problem with distributed queues. I am using JBoss AS 5.0.1.GA.
      What I want is to send the message to all the topics with the same JNDI Names on the cluster nodes. I have set the clustered property of the topics to true but doesn't help. Is there a way to do it?

      My code:

      on one node I create the InitialContext

      InitialContext context = new InitialContext();
      Object tmp = context.lookup(JndiName);
      ConnectionFactory cf = (ConnectionFactory) tmp;
      Connection connection = cf.createConnection();
      Session session = connection.createSession(false, QueueSession.AUTO_ACKNOWLEDGE);
      Destination destination = (Destination) context.lookup(TOPIC);

      Topic config:
      <mbean code="org.jboss.jms.server.destination.TopicService"
       name="jboss.messaging.destination:service=Topic,name=JMS_TOPIC" xmbean-dd="xmdesc/Topic-xmbean.xml">
       <depends optional-attribute-name="ServerPeer">jboss.messaging:service=ServerPeer</depends>
       <attribute name="JNDIName">tst/JMS_TOPIC</attribute>
       <attribute name="Clustered">true</attribute>

      with this configuration I have the message sent only to the topic on the local node, but not to the topics on the other nodes in the cluster.

      Any help is appreciated.

      Thank you