Qpid
  1. Qpid
  2. QPID-3377

Sending message with a subject to a queue fails

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 0.10
    • Fix Version/s: 0.12
    • Component/s: Java Client
    • Labels:

      Description

      Having a queue bound just to default exchange and sending a message with a subject to the queue results in dropping the message by the default queue.

      Replication steps:
      1) qpid-config add queue testQueue
      2) cd /usr/share/doc/qpid-java-0.10/examples
      3) ./run_example.sh org.apache.qpid.example.Spout testQueue/someSubject
      4) qpid-stat -e shows the default '' exchange dropped the message

      Patch already proposed.

        Activity

        Hide
        Pavel Moravec added a comment -

        Patch proposal. Reasoning of the change:

        routing key was wrongly changed from (already properly set) message subject to queue name. That was due to wrong test:

        if (destination.getTargetNode().getType() == AMQDestination.TOPIC_TYPE)

        in method sendMessage in client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java file. That condition is everytime evaluated as true, since target node is set to TOPIC type every time. Proper test is rather:

        if (destination.getAddressType() == AMQDestination.TOPIC_TYPE)

        Show
        Pavel Moravec added a comment - Patch proposal. Reasoning of the change: routing key was wrongly changed from (already properly set) message subject to queue name. That was due to wrong test: if (destination.getTargetNode().getType() == AMQDestination.TOPIC_TYPE) in method sendMessage in client/src/main/java/org/apache/qpid/client/BasicMessageProducer_0_10.java file. That condition is everytime evaluated as true, since target node is set to TOPIC type every time. Proper test is rather: if (destination.getAddressType() == AMQDestination.TOPIC_TYPE)
        Hide
        Pavel Moravec added a comment -

        some crucial typos in bug description corrected.

        Show
        Pavel Moravec added a comment - some crucial typos in bug description corrected.
        Hide
        Rajith Attapattu added a comment -

        Fixed with a test case.

        Show
        Rajith Attapattu added a comment - Fixed with a test case.
        Hide
        Robbie Gemmell added a comment -

        r1153299 caused the java 0-9-1 test profiles to fail (the Jenkins failure email didnt go to the notifications list because I'm setting up a new matrix test project and its a semi broken just now due to issues with 2 of the 3 the ubuntu slaves, so I only have it emailing me right now.)

        Show
        Robbie Gemmell added a comment - r1153299 caused the java 0-9-1 test profiles to fail (the Jenkins failure email didnt go to the notifications list because I'm setting up a new matrix test project and its a semi broken just now due to issues with 2 of the 3 the ubuntu slaves, so I only have it emailing me right now.)

          People

          • Assignee:
            Rajith Attapattu
            Reporter:
            Pavel Moravec
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 2h
              2h
              Remaining:
              Remaining Estimate - 2h
              2h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development