3 Replies Latest reply on Aug 25, 2004 10:07 AM by Adrian Brock

    Proposal: Distributed Destinations

    MR Newbie

      All,

      we are looking for a possibility to send JMS messages to some kind of distributed destination.
      BEA has something like this in their cluster functionality and I was speaking to Ivelin who told
      me that the current JBoss JMS Cluster features does not include such feature.

      I am willing to implement it and want to ask for some hints. I am thinking of creating a MBean
      which can be deployed like this:


      <mbean code="org.jboss.mq.server.jmx.DistributedTopic"
       name="jboss.mq.destination:service=DistributedTopic,name=topic.MyDistributedTopic">
       <depends>jboss:service=DefaultPartition</depends>
       <attribute name="PartitionName">DefaultPartition</attribute>
       <attribute name="LocalTopic">topic.MyLocalTopic</attribute>
      </mbean>


      It would work the way that each cluster instance will have a normal topic eg "topic.MyLocalTopic"
      and the distributed topic would be deployed using the farm service or just on each cluster instance.
      The distributed topic would be available in the HAJndi whereas the local topics would only be
      available on each server instance.

      A message send to the distributed topic would be send to each cluster instance to the configured local topic.


      Is this something that makes sense and can somebody give me a hint how this fits into "JMS on JBss"

      Thanks,

      Marcus
      GEDOPLAN GmbH
      JBoss Service Partner

        • 1. Re: Proposal: Distributed Destinations
          Adrian Brock Master

          It is certainly possible using something similar to this:

          http://www.jboss.org/index.html?module=bb&op=viewtopic&t=46193
          which is a TODO.

          My point with transactions is that if you send a message to ServerA inside a
          transaction it will be persisted there.

          Then you need a further JTA transaction that uses two phase commit to
          move it to serverB and remove it from serverA.

          client -> Topic -> ProxyTopicSubscription (transaction 1 - might not be JTA)
          ProxyTopicSubscription -> RealTopicSubscription (transaction 2 - must be JTA)

          If you tried to do:
          client -> Topic -> ProxyTopicSubscription -> RealTopicSubscription
          in one transaction. JBossMQ's local transaction would have to be made into a real DTM
          implementation, which is not a correct abstraction.

          • 2. Re: Proposal: Distributed Destinations
            MR Newbie

            Adrian,

            thanks for the reply, but I do not understand the point about transactions. What I would like to do is just call a method on my DitributedTopicMBean on every cluster member which then gives the message to the local topic.

            The scenario I am looking for does not need transactions. Once the message is send to the distributed topic it is handled by the machine, the message was sent to, as a normal message and the "distribution" is just a side effect.

            Is this possible or am I on the wrong track?

            --Marcus

            • 3. Re: Proposal: Distributed Destinations
              Adrian Brock Master

              It is certainly possible using something similar to this:

              http://www.jboss.org/index.html?module=bb&op=viewtopic&t=46193
              which is a TODO.

              My point with transactions is that if you send a message to ServerA inside a
              transaction it will be persisted there.

              Then you need a further JTA transaction that uses two phase commit to
              move it to serverB and remove it from serverA.

              client -> Topic -> ProxyTopicSubscription (transaction 1 - might not be JTA)
              ProxyTopicSubscription -> RealTopicSubscription (transaction 2 - must be JTA)

              If you tried to do:
              client -> Topic -> ProxyTopicSubscription -> RealTopicSubscription
              in one transaction. JBossMQ's local transaction would have to be made into a real DTM
              implementation, which is not a correct abstraction.