Bug 61569

Summary: JMS Point-to-Point Test Plan: Synchronization issue when putting reply
Product: JMeter Reporter: Igor Panainte <panainte.i>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: RESOLVED FIXED    
Severity: normal CC: p.mouawad
Priority: P2    
Version: 2.13   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Igor Panainte 2017-09-27 18:21:50 UTC
Hi,

I selected JMSMessageID for request and JMSCorrelationID for response and this correlation doesn't work properly.

lib: ApacheJMeter_jms.jar

I have investigated and found that problem is in concurrency. Producer (FixedQueueExecutor line: 82) send a message, consumer (Receiver line: 134) got a reply before producer save a request in placeholder and try to save it in  placeholder, MessageAdmin(line: 124) try to get a request holder but it was not save till and result will be null and request will fail.

Solution: 
Receiver.java line: 133-135
  
  } else {
      admin.putReply(messageKey, reply);
  }

replace with:
  
  } else {
      synchronized(admin) {
         admin.putReply(messageKey, reply);
      }
  }

I fixed and tested this bug on my local machine after that I didn't have any problem with response fail.

If you need I can provide more details about this bugfix. 

Regards,
Igor
Comment 1 Philippe Mouawad 2017-09-27 18:36:38 UTC
Author: pmouawad
Date: Wed Sep 27 18:36:16 2017
New Revision: 1809895

URL: http://svn.apache.org/viewvc?rev=1809895&view=rev
Log:
Bug 61569 - JMS Point-to-Point Test Plan: Synchronization issue when putting reply
Bugzilla Id: 61569

Modified:
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java
    jmeter/trunk/xdocs/changes.xml