[jpos-users] Need a support in configuring MUX

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[jpos-users] Need a support in configuring MUX

Titus Rakkesh
Hi all,
      We are developing an application using jPos library. We have implemented an ISOServer code and ISORequestListener code like below. It is working fine when requests come sequentially. But when multiple requests come concurrently the requests are waiting for the other requests to finish processing. Simply saying one by one only requests are getting processed. So my worry is how this ThreadPool get utilized? Only 1 Active Thread at a time. How we can solve? Our client make a single connection and keep that connectivity sending heart beats. They send txn requests also.

1. Will it possible make to every new ISO request to be assigned a thread from the the ThreadPool?
2. Will MUX helps us to solve the problem?

The following way only we defined the server and listener.

ISOServer

              Logger loggerJpos = new Logger();
            //logger.addListener(new SimpleLogListener(System.out));
           
          
            loggerJpos.addListener(new SimpleLogListener(new PrintStream(new FileOutputStream(logFile, true))));
           
            ServerChannel channel = new PostChannel(new    GenericPackager(AppConst.getInstance().geXXXXISOPackager()));
            ((LogSource) channel).setLogger(loggerJpos, "channel");
            int port = Integer.parseInt(AppConst.getInstance().getXXXXXISOPort());
            threadPool = new ThreadPool(100, 200);
            ISOServer server = new ISOServer(port, channel, threadPool);
            server.setLogger(loggerJpos, "server");
            server.addISORequestListener(new XXXISOServer());
            new Thread(server).start();

ISORequest listener

public interface XXXXISORequestListener {
    public boolean process(ISOSource source, ISOMsg m);
}

Thanks,
Titus

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage. Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/CABm7V60Kiy0385PmbaEY_Vz4Er6VbGgwb0Wi%2B7W0g3_ZnqZcvg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Need a support in configuring MUX

jPOS - Users mailing list
On 16/02/17 09:46, Titus Rakkesh wrote:
> 1. Will it possible make to every new ISO request to be assigned a
> thread from the the ThreadPool?
You can let the MUX do it's job - remeber to configure the matching
criteria if 11 and 41 are not good enough for your request/response
matching.
> 2. Will MUX helps us to solve the problem?
I don't see you have described a problem, but a MUX or (QMUX) will allow
you to have multiple transactions in flight.
Q2 or jpos-ee are your friends, as is the Programmer's guide.

--
Mark

--
--
jPOS is licensed under AGPL - free for community usage for your open-source project. Licenses are also available for commercial usage.  Please support jPOS, contact: [hidden email]
---
You received this message because you are subscribed to the Google Groups "jPOS Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/3ca40f13-3b1f-a9c6-dd29-5d11a8daeec9%40talktalk.net.
For more options, visit https://groups.google.com/d/optout.