Uploaded image for project: 'Qpid'
  1. Qpid
  2. QPID-6064

if 'strict jms' mode isnt enabled, the 0-10 client will fail to set 'subject' on Address used for JMSDestination in certain cases

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 0.24, 0.26, 0.28, 0.30
    • Fix Version/s: None
    • Component/s: JMS AMQP 0-x
    • Labels:
      None

      Description

      When reviewing QPID-6052, I noticed that AMQMessageDelegate_0_10 will fail to pass the 'subject' of the Address to the method which created the JMSDestination, unless the 'strict jms' flag is set.

      Its not clear this is intended, as it seems the code is only aiming to rewrite the incoming 'qpid.subject' property to use a legal JMS property name whenever 'strict jms' is set. This looks like a defect introduced when the renaming functionality was added in QPID-3838 (via http://svn.apache.org/r1480656 and some further tidyup commits), which would mean some addresses being returned by convertToAddressBasedDestination(..) will have been different (and presumably wrong) ever since that point unless 'strict jms' happened to be set.

                  String subject = null;
                  if (isStrictJMS && messageProps != null && messageProps.getApplicationHeaders() != null)
                  {
                      subject = (String)messageProps.getApplicationHeaders().get(QpidMessageProperties.QPID_SUBJECT);
                      if (subject != null)
                      {
                          messageProps.getApplicationHeaders().remove(QpidMessageProperties.QPID_SUBJECT);
                          messageProps.getApplicationHeaders().put("JMS_" + QpidMessageProperties.QPID_SUBJECT_JMS_PROPER,subject);
                      }
                  }
                  dest = (AMQDestination) convertToAddressBasedDestination(_deliveryProps.getExchange(),
                          _deliveryProps.getRoutingKey(), subject, false, AMQDestination.UNKNOWN_TYPE);
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                robbie Robbie Gemmell
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: