I am sending only one purchase request using JPOS, however I am getting duplicate requests in the logs.
<log realm="simulator_10000.server.session/127.0.0.1:50948" at="2023-05-01T09:09:25.736368">
<session-start/>
</log>
<log realm="simulator_10000.server.session/127.0.0.1:50960" at="2023-05-01T09:09:25.743136">
<session-start/>
</log>
<log realm="org.jpos.transaction.TransactionManager" at="2023-05-01T09:09:26.002006" lifespan="431ms">
<abort>
txnmgr-2:idle:12
<context>
CC_TR_REQUEST(P):
<isomsg direction="outgoing">
<!-- net.shamirix.utils.CustomPacker1993 -->
<field id="0" value="1200"/>
<field id="2" value="2223600089700011"/>
<field id="3" value="000000"/>
<field id="4" value="000000000014"/>
<field id="7" value="0501090925"/>
…
<field id="64" value="10011001"/>
<field id="128" value="A8CDDA88FFFFFFFF" type="binary"/>
</isomsg>
CC_ISO_SOURCE: org.jpos.iso.channel.XMLChannel@1089f917
RESPONSE:
<isomsg direction="incoming">
<!-- net.shamirix.utils.CustomPacker1993 -->
<field id="0" value="1210"/>
<field id="2" value="2223600089700011"/>
<field id="3" value="000000"/>
<field id="4" value="000000000014"/>
<field id="7" value="0501090925"/>
…
<field id="64" value="3130303131303031" type="binary"/>
<field id="128" value="A8CDDA88FFFFFFFF" type="binary"/>
[![jpos logs][1]][1]
</isomsg>
DESTINATION: jPOS-AUTORESPONDER
REQUEST(P):
<isomsg direction="outgoing">
<!-- net.shamirix.utils.CustomPacker1993 -->
<field id="0" value="1200"/>
<field id="2" value="2223600089700011"/>
<field id="3" value="000000"/>
<field id="4" value="000000000014"/>
<field id="7" value="0501090925"/>
…
<field id="64" value="10011001"/>
<field id="128" value="A8CDDA88FFFFFFFF" type="binary"/>
</isomsg>
PAYMENT_PROCESSOR_RESPONSE:
<isomsg direction="incoming">
<!-- net.shamirix.utils.CustomPacker1993 -->
<field id="0" value="1210"/>
<field id="2" value="2223600089700011"/>
<field id="3" value="000000"/>
<field id="4" value="000000000014"/>
<field id="7" value="0501090925"/>
…
<field id="64" value="3130303131303031" type="binary"/>
<field id="128" value="A8CDDA88FFFFFFFF" type="binary"/>
</isomsg>
Error: unconnected ISOChannel
</context>
in-transit=3/4, head=14, tail=10, paused=0, outstanding=0, active-sessions=4/250, tps=0, peak=2, avg=0.01, elapsed=431ms
</abort>
</log>
Those are two different entries,
REQUESTandCC_TR_REQUESTplaced there probably by two different participants. I noticed you are setting the persist flag to true (that's the(P)indicator you see in the logs) by setting the boolean third parameter inctx.putand while that can be totally OK, I wonder if that's what you really want. You need to take into account that this could persist sensitive data.