3 Replies Latest reply on Jun 7, 2007 4:44 AM by timfox

    Questions about topics in a cluster

    icruz

      Hello,

      If we have a MDB deployed in a JBoss cluster listening from a topic, messages sent to this topic, will be received by only a MDB instance of one node? or will be received by a MDB instance in every node of the cluster?

      Which is the difference if we mark the topic as "Clustered" or not?

      Thanks in advance!

        • 1. Re: Questions about topics in a cluster
          timfox

          If the topic is marked as clustered=false then only MDBs on the local node will receive messages sent to it from that node.

          If it is marked as clustered=true then any MDB in the cluster listening on the topic will receive messages sent to the topic from any node.

          • 2. Re: Questions about topics in a cluster
            icruz

            Thank you Tim,

            when you say any MDB in the cluster will receive messages sent to the topic, you mean one and only one MDB will receive the message, but not one in each node... is it?

            • 3. Re: Questions about topics in a cluster
              timfox

              You're thinking of a queue.

              With a queue, the message is only received by one consumer, with a topic it is received by all subscribers.

              Topics are a form of "publish / subscriber" messaging (you can google this for more info)

              Queues are a form of "point to point messaging".

              The JMS spec also goes into more detail on this.