Uploaded image for project: 'JBoss A-MQ'
  1. JBoss A-MQ
  2. ENTMQ-1185

IndividualDeadLetterStrategy.isDLQ() returns true if Prefix is set to empty String

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • JBoss A-MQ 6.2.1
    • JBoss A-MQ 6.2
    • broker
    • None
    • Hide
              IndividualDeadLetterStrategy myIDLS = new IndividualDeadLetterStrategy();
              myIDLS.setQueuePrefix("");
              ActiveMQDestination testQueue = createDestination("FOO.BAR");
              ActiveMQMessage testAmqMessage = new ActiveMQMessage();
              testAmqMessage.setDestination(testQueue);
              ActiveMQDestination destQueueDlq = myIDLS.getDeadLetterQueueFor(testAmqMessage, null);
              boolean output = myIDLS.isDLQ(destQueueDlq); 
              System.out.println( destQueueDlq.getPhysicalName()+ " == "+ output);
              output = myIDLS.isDLQ(testQueue); 
              System.out.println( testQueue.getPhysicalName()+ " == "+ output);
              assertTrue(output);
      
      Show
      IndividualDeadLetterStrategy myIDLS = new IndividualDeadLetterStrategy(); myIDLS.setQueuePrefix(""); ActiveMQDestination testQueue = createDestination( "FOO.BAR" ); ActiveMQMessage testAmqMessage = new ActiveMQMessage(); testAmqMessage.setDestination(testQueue); ActiveMQDestination destQueueDlq = myIDLS.getDeadLetterQueueFor(testAmqMessage, null ); boolean output = myIDLS.isDLQ(destQueueDlq); System .out.println( destQueueDlq.getPhysicalName()+ " == " + output); output = myIDLS.isDLQ(testQueue); System .out.println( testQueue.getPhysicalName()+ " == " + output); assertTrue(output);

    Description

      Setting an empty String on IndividualDeadLetterStrategy using setQueuePrefix("") would create the the DLQ with same name as the queue for which DLQ was created using getDeadLetterQueueFor() method.

      isDLQ() method then returns true for both the queues since prefix was set to "".

      Attachments

        Activity

          People

            gtully@redhat.com Gary Tully
            rbhardwa_jira Ravi Bhardwaj (Inactive)
            Tomas Plevko Tomas Plevko
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: