javaiso8583jpos

Why is QMUX.request() method designed to pass the timeout parameter compulsorily?


I am connecting to a host using the config below, which has the timeout property too. Now my question is why do I again need to pass the timeout param to QMUX.request(msg, timeout) ? my understanding is that, the purpose of <property name="timeout" value="60000"/> and timeout param of QMUX.request(msg,timeout) method same. please correct me if I am wrong.

 <channel-adaptor name="my-channel-adaptor"
                     class="org.jpos.q2.iso.ChannelAdaptor"
                     logger="Q2"
                     realm="my-channel-realm"
                     pool-size="50"
                     thread-pool-size="10">
      <channel class="org.jpos.iso.channel.ASCIIChannel"
               packager="org.jpos.iso.packager.GenericPackager">
        <property name="host" value="localhost"/>
        <property name="port" value="65000"/>
        <property name="timeout" value="60000"/>
        <property name="maxPacketLength" value="4096"/>
        <property name="header" value="600"/>
        <property name="lengthHeader" value="2"/>
        <property name="keepAlive" value="true"/>
      </channel>
    </channel-adaptor>

Solution

  • My understanding is that, the purpose of <property name="timeout" value="60000"/> and timeout param of QMUX.request(msg,timeout) method same.

    I don't think so.


    Why is QMUX.request() method designed to pass the timeout parameter compulsorily?

    That is something you would need to ask the org.jpos designers.