Search code examples
javaiso8583jpos

How can i parse two different iso format in JPOS with two custom packager from one client


I am using JPOS for implement EFT switch. I have a client that depend on Bank bin send two different format of the ISO8583. How can i process all requests and response same type of request ISO.

I use this XML to config clients

<channel-adaptor name="cms-rx-tx" class="org.jpos.q2.iso.ChannelAdaptor">

    <channel class="org.jpos.iso.channel.ASCIIChannel"
             packager="org.jpos.iso.packager.ISO87APackager">
        <property name="host" value="xxx.xxx.xxx.xxx"/>
        <property name="port" value="xxxx"/>
        <property name="connect-timeout" value="15"/>
    </channel>
    <in>cms-channel-client-send</in>
    <out>cms-channel-client-receive</out>
    <reconnect-delay>10000</reconnect-delay>
</channel-adaptor>

Solution

  • If you want to use the same port, you need a special Channel implementation that would override the 'getDynamicPackager' method. It's customary to use different ports for different packagers, though.