jmeter-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 62256] New: JMS (P2P) and JMS Subscriber not working properly with Throughput Controller in a Test script
Date Wed, 04 Apr 2018 13:15:10 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=62256

            Bug ID: 62256
           Summary: JMS (P2P) and JMS Subscriber not working properly with
                    Throughput Controller in a Test script
           Product: JMeter
           Version: 4.0
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Main
          Assignee: issues@jmeter.apache.org
          Reporter: vishalendu@gmail.com
  Target Milestone: ---

Created attachment 35838
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=35838&action=edit
JMeter script for the POC of issue

I am doing an automation where 
1) A script (Producer) will call some API and put the output on a JMS Queue. It
would end after that.
2) Another script (Consumer) will pick these messages and execute them.

I had some issue with the second script. (Which almost took a day to figure
out.)
Script look something like this:

Read From JMS (JMS P2P) (Tried this with JMS Subscriber as well)
   If (Message not empty)
      Throughput Controller 1 (50%)
                : Do some work
      Throughput Controller 2 (50%)
                : Do some work


Even though, I was running the above script with a single thread and 2
iterations, I could see in the Result Tree Listener that the "JMS P2P" sampler
was getting called 2 times in the begining, instead of being called
sequentially. This was confusing and frustrating, since I was running 1 thread.

FYI, there is a configuration on the JMS P2P/JMS Subscriber samplers "Number of
Samples to aggregate". This was set to 1 all along.

Since the JMS P2P was getting called in the beginning 2 times, both the
Throughput Controllers were getting the last JMS message. Due to this, one of
the Transaction passed and the other failed.

I had to resort to the following solution:

Read From JMS (JMS P2P)
   If (Message not empty)
       Random Controller1
               : Simple Controller1
                       : Do some work
       Random Controller2
               : Simple Controller2
                       : Do some work

I am attaching a script that I used to do a POC for this issue. You will have
to add activemq jars to your lib/ext for the ActiveMQ JMS P2P to work. Create a
test queue named TestQueue and put the following messages:

{"txnId":"1"}
and
{"txnId":"2"}

When you run the attached test script, the JSR223 Sampler1/2 will both print
the txnId as 2. Even though there is only 1 thread and 2 iterations.

-- 
You are receiving this mail because:
You are the assignee for the bug.
Mime
View raw message