Abhishek Jangra
Abhishek Jangra

Reputation: 21

Error in Running Multiple Threads with JPOS on JMeter for ISO8583

I am Trying to run My IS08583 Script for Multiple Users using JPOS Plugin. However i could find below Output in the Sampler Result. Can anyone suggest what settings needs to be changed in JPOS for running my Script on Multiple users without this Error. Currently i am running only 2 Threads, in which one thread gives successful Output and Other gives error as mentioned below..

Thread Name: GBM_Transaction Sample Start: 2020-08-24 15:45:13 IST Load time: 1 Connect Time: 0 Latency: 0 Size in bytes: 0 Sent bytes:0 Headers size in bytes: 0 Body size in bytes: 0 Sample Count: 1 Error Count: 1 Data type ("text"|"bin"|""): text Response code: Response message: org.jpos.iso.ISOException: Duplicate key 'jmeter-2d8b3043-send.120000003938777.req' detected

SampleResult fields: ContentType: DataEncoding: null

Upvotes: 0

Views: 906

Answers (1)

tilln
tilln

Reputation: 66

When sending and receiving multiple request and response messages over the same socket connection, jPOS needs to match responses (as they may come in in a different order) to requests. It does that based on keys it generates for each message, e.g. jmeter-2d8b3043-send.120000003938777.req.

The part 120000003938777 is generated (by default) from the fields MTI (1200), DE41 and DE11 (00003 and 938777 presumably).

If your script does not vary those fields e.g. randomly, as suggested, the same key will be generated for multiple messages and you get that error when jPOS detects the duplicate key. Obviously, this makes it impossible to unambiguously match responses to requests.

What you can do is:

  • vary the fields DE41 and/or DE11, or
  • in case your messages do not contain those fields, define different keys in the "ISO8583 Connection Configuration" under "Mux Key Configuration" and vary those.

The JMeter functions ${__time()} and ${__RandomString()} are quite useful for that.

Refer also https://github.com/jpos/jPOS/blob/master/doc/src/asciidoc/ch08/qmux.adoc#mti-mapping-and-default-key.

Disclaimer: I am the author of the JMeter ISO8583 plugin.

Upvotes: 1

Related Questions