Bug 46142 - jms receiver will not validate if JMSCorrelationID is not populated
jms receiver will not validate if JMSCorrelationID is not populated
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.3.4
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
: 47288 (view as bug list)
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2008-11-03 12:47 UTC by Richard Donovan
Modified: 2010-06-21 17:27 UTC (History)
2 users (show)



Attachments
svn diff of Receiver.java with modified JMS request ID (889 bytes, text/x-java)
2008-11-03 12:47 UTC, Richard Donovan
Details
JMS request response sampler log (10.59 KB, application/octet-stream)
2010-06-17 10:21 UTC, João Ferreira
Details
JMS request response sampler log for nightly build (11.28 KB, application/octet-stream)
2010-06-17 10:22 UTC, João Ferreira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Richard Donovan 2008-11-03 12:47:48 UTC
Created attachment 22823 [details]
svn diff of Receiver.java with modified JMS request ID

With openJMS, Jboss jms, when sending and receiving jms messages with Jmeter. The request and response will always fail. The receiver message will always fail since it looks for a receiver with a JMSMessageID equal to the JMSMessageCorrelation id. 

For the JMeter style receiver testing it is more appropriate to check for the populated JMSMessageID on the receiver. 

A diff of the Receiver.java  has been attached. 

The same item has been raised on the nabble forum here 
http://www.nabble.com/-BUG---JMeter-JMS---Correlation-ID-does-not-work-for-JBoss-Messaging-to12313381.html#a12313381
Comment 1 Sebb 2008-11-04 11:28:57 UTC
Thanks, fixed in SVN:

URL: http://svn.apache.org/viewvc?rev=711364&view=rev
Log:
Bug 46142 - JMS Receiver now uses MessageID
Comment 2 rohan.hart17 2009-07-23 20:55:09 UTC
Please back out this change as it causes OpenMQ to fail.

When resending jms messages there seems to be no requirement to retain the message id.  The correlation id is designed to do exactly what JMeter requires - all the client has to do is populate it which is not done automatically.
Comment 3 rohan.hart17 2009-07-23 20:59:46 UTC
*** Bug 47288 has been marked as a duplicate of this bug. ***
Comment 4 Tony Lefebvre 2009-09-29 05:45:04 UTC
+1,
yes, please back out this change.

The JMS provider implementations compute  itself the JMSMessageID (as does TIBCO EMS) and the client doesn't have control over it.

"The JMSMessageID header field contains a value that uniquely identifies each
message sent by a provider.
When a message is sent, JMSMessageID is ignored. When the send method
returns, the field contains a provider-assigned value."

source:
Java™ Message Service
Version 1.1 April 12, 2002
3.4.3 JMSMessageID


Using JMSMessageID has a correlation ID may be only useful for testing the EMS server itself.
Comment 5 João Ferreira 2010-06-17 10:21:42 UTC
Created attachment 25603 [details]
JMS request response sampler log

Log showing that JMS request response support is not working as expected in TIBCO EMS in jmeter 2.4.3

The application being tested uses the request messageID to set the response correlationID
Comment 6 João Ferreira 2010-06-17 10:22:40 UTC
Created attachment 25604 [details]
JMS request response sampler log for nightly build
Comment 7 Sebb 2010-06-18 08:05:18 UTC
JMS Point-to-Point correlation is now selectable; can choose to match the request MessageId or Correlation Id against the response MessageId or CorrelationID.

Hopefully that will satisfy all possible JMS application requirements.

URL: http://svn.apache.org/viewvc?rev=955958&view=rev
Log:
Bug 46142 - JMS Point-to-Point correlation problems

Modified:
   jakarta/jmeter/trunk/docs/images/screenshots/jms/JMS_Point-to-Point.png
   jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages.properties
   jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/control/gui/JMSSamplerGui.java
   jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/JMSSampler.java
   jakarta/jmeter/trunk/xdocs/changes.xml
   jakarta/jmeter/trunk/xdocs/images/screenshots/jms/JMS_Point-to-Point.png
   jakarta/jmeter/trunk/xdocs/usermanual/component_reference.xml
Comment 8 Sebb 2010-06-18 08:35:40 UTC
The fixes are in nightlies from r955958.

Please test and report any problems ASAP.
Comment 9 João Ferreira 2010-06-21 15:34:11 UTC
Without great testing this is working for me now (Tibco JMS using request messageId as correlationId in reply)

(In reply to comment #8)
> The fixes are in nightlies from r955958.
> 
> Please test and report any problems ASAP.
Comment 10 João Ferreira 2010-06-21 15:38:28 UTC
If you interested in implementing some unit test code, you could use mockrunner...

I tried but there are some minor problems in the JNDI support (Context.getEnvironment() throws NotImplementedException )and in the credentials code of jmeter.

Just a sugestion...
Comment 11 Sebb 2010-06-21 17:27:03 UTC
OK, thanks for confirming that Tibco is working OK.

Given that the previous behaviour can still be selected by suitable choice of the options, I'm closing this bug.