Summary: | JMS point-to-point: request response test does not work | ||
---|---|---|---|
Product: | JMeter - Now in Github | Reporter: | Paul Woolley <pwoolley> |
Component: | Main | Assignee: | JMeter issues mailing list <issues> |
Status: | RESOLVED FIXED | ||
Severity: | major | CC: | chennupatiharikrishna |
Priority: | P2 | ||
Version: | 2.3.1 | ||
Target Milestone: | --- | ||
Hardware: | Other | ||
OS: | Windows XP | ||
Attachments: |
Proposed fix
Proposed fix |
Description
Paul Woolley
2007-12-27 03:47:13 UTC
Created attachment 21322 [details]
Proposed fix
Have attached a proposed fix for this bug.
Actually, after a bit more investigation, I think keying on JMSCorrelationID would be a better idea for the FixedQueueExecutor and the Receiver. Although, in principle, keying on JMSMessageID should be ok, I've been running some tests with ActiveMQ 4.1.1 and I can see that whenever ActiveMQ sends a message, it sets a new JMSMessageID, even if you've written a MessagePostProcessor to reset/preserve the message id. The situation I am seeing fail is: a) JMeter sends a message to queue A with message id 1 b) My code reads message id 1 from queue A, does some processing and compiles a brand new message. c) My code puts the new message on queue B, and a MessagePostProcessor attempts to set the JMSMessageID to 1. d) ActiveMQ goes ahead and assigns a new message id just before sending. e) JMeter reads from queue B. Its expects message id 1, but thanks to ActiveMQ, it finds message id ?. Failure! A quick retry with a recompiled FixedQueueExecutor and Receiver that key on JMSCorrelationID succeeds if I re-run the above test. This makes more sense as section 3.4.5 of the JMS 1.1 spec states: "A client can use the JMSCorrelationID header field to link one message with another. A typical use is to link a response message with its request message." With this in mind, I think the proposed fix should be to change org.apache.jmeter.protocol.jms.sampler.FixedQueueExecutor to key the sent message in to the MessageAdmin object using JMSCorrelationID. Created attachment 21323 [details]
Proposed fix
Proposed fix
Thanks for the patch; applied in SVN r610480. In future, please provide patches in unified diff format, rather than entire source files, as that makes the patches easier to review. This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2058 |