0 Replies Latest reply on Jan 18, 2008 12:07 PM by clebert.suconic

    JBMESSAGING-1216 - ClusteredTopic returning Queue instead of

    clebert.suconic

      On this bug, when you have a MessageSubscriber, when the message is transfered over the Cluster, sometimes you get instances of Topic.

      (condition replicated on DistributedTest::testDestinationTypeOnMessage, which is just Phillip's test converted as a testcase)


      Looking at MessageCustomer, it aways create producers and consumers as Queues. To fix that I'm doing these changes:

      I - Exposing the isQueue attribute on the Condition interface
      II - MessageSucker will now receive the condition as well (besides just the Queue)
      III - MessageSucker will create a Topic or Queue according to the condition.

      -JBossDestination dest = new JBossQueue(localQueue.getName(), true);
      +JBossDestination dest = condition.isQueue()?new JBossQueue(localQueue.getName(), true): new JBossTopic(localQueue.getName(), true);
      producer = localSession.createProducerDelegate(dest);
      




      Anyone sees any problem on the fix as described?