I realized that not only did my test pgm have an extra post increment of a
loop variable, but it was setting a string property named correlationId as
well as setting the correlation ID header field. Specifically:
message.setStringProperty( "correlationId", correlId );
message.setJMSCorrelationID( correlId );
Since the MessageServlet's setResponseHeaders gets properties, that is why
the HTTP response contains a "correlationId" header in the test. If I
comment-out the setting of the string property, and only make the
setJMSCorrelationID call, then the Java pgm does not receive a correlationId
header in the response. That makes sense now.
While the fix for https://issues.apache.org/jira/browse/AMQ-3857 does enable
the MessageServlet to send message properties back by way of HTTP response
headers. It is not a fix for this jira AMQ-4072, which is asking for the
JMSCorrelationID message header to be sent back in the HTTP response. I
assume it should go back by way of a HTTP response header, and should take
precedence over a message property having the same name.
-----
Stephen Vincent
--
View this message in context: http://activemq.2283324.n4.nabble.com/No-correlation-ID-in-HTTP-header-when-using-RESTful-interface-tp4656327p4656897.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.
|