below is my client mux config. I am facing the problem that when I send 100 requests, only the first 5 are reached to the server and I am able to get the response within 100 ms.my understanding is as soon as I got the response mux is supposed to send the remaining request to the server but it is not happening so all the rest of the 95 request gets a null response from the call to mux.request(msg,25000).
10_client_channel.xml
<?xml version="1.0" ?>
<channel-adaptor name="manager"
class="org.jpos.q2.iso.MultiSessionChannelAdaptor" logger="Q2">
<in>channel-Tx</in>
<out>channel-Rx</out>
<sessions>5</sessions>
<timeout>30000</timeout>
<keep-alive>yes</keep-alive>
<max-connect-attempts>30000000000</max-connect-attempts>
<reconnect-delay>100</reconnect-delay>
<channel name="client-channel" class="org.jpos.iso.channel.ASCIIChannel" logger="Q2"
packager="org.jpos.iso.packager.GenericPackager">
<filter class="org.jpos.iso.filter.DebugFilter" direction="outgoing"/>
<property name="host" value="localhost"/>
<property name="port" value="65000"/>
<property name="timeout" value="60000"/>
<property name="packager-config" value="${catalina.base}/conf/esewa/isoproperties/iso8583f1soft.xml"/>
</channel>
</channel-adaptor>
20_client_qmux.xml
<?xml version="1.0" ?>
<mux class="org.jpos.q2.iso.QMUX" logger="Q2" name="jpos-client-mux">
<in>channel-Rx</in>
<out>channel-Tx</out>
<ready>jpos-client-adaptor.ready</ready>
<key>11,37</key>
<unhandled>Channel-unhandled</unhandled>
</mux>
private QMUX qmux; is defined as a global variable and initialized via the constructor like:
qmux= NameRegistrar.get("mux.jpos-client-mux"); channelTimeoutPeriod=25000;
Below are the rest of the relevant codes as per @Andrés Alcarraz `s request
log.info("firing ISO....");
applicationResponse.setIsoRequestTime(new Date());
ISOMsg responseISOMessage= qmux.request(requestISOMessage,channelTimeoutPeriod);
applicationResponse.setIsoResponseTime(new Date());
log.info("responseISOMessage:{}",responseISOMessage);