Robbie Gemmell created QPID-6064:
------------------------------------
Summary: if 'strict jms' mode isnt enabled, the 0-10 client will
fail to set 'subject' on Address used for JMSDestination in certain cases
Key: QPID-6064
URL: https://issues.apache.org/jira/browse/QPID-6064
Project: Qpid
Issue Type: Bug
Components: Java Client
Affects Versions: 0.28, 0.26, 0.24, 0.30
Reporter: Robbie Gemmell
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.
{noformat}
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);
{noformat}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]