Complex issue

Skip to first unread message

James Loveday

Sep 16, 2022, 5:12:17 AMSep 16
to jPOS Users
Hi guys, 

I know the heading is a bit mysterious but I'm hoping that somebody can advise here 

So the situation then. 

Jpos sits at the bottom of the stack integrating with a client. 

Communication between the stack and jpos is via JSON/ReST and communication with the client is through TCP/IP. 

We've done this for a number of clients and have no issues so far. 

The issue here is that the client needs to establish the connection with us instead of us establishing it with them. 

So the client needs us to act as the server for them to establish the connection and then act as the client to send the data. 

My understanding is that the TCP/IP socket will allow for 2-way communication as I have seen with other clients, when the connection drops either can re-establish the connection. 

We have a qmux configured to handle outbound and inbound messages. 
We have an incoming message listener set up to handle incoming messages but for some reason the connection cannot be established with us. 

Does anybody have any advice to get over this situation here 

James Loveday

Sep 16, 2022, 9:45:41 AMSep 16
to jPOS Users
As a follow up I've implemented a connection listener that fires an echo when a connection has been established but I'm unsure if this will happen when they connect to us or us to them. 

Alejandro Revilla

Sep 16, 2022, 3:46:50 PMSep 16
You can add a `connection-listener` to your QServer.

The connection listener allows you to add ISOServerEventListener to your QServer. The ISOServerEventListener has a very simple interface:

public interface ISOServerEventListener {
    void handleISOServerEvent(EventObject event);

The event can be an  ISOServerShutdownEvent, ISOServerClientDisconnectEvent, ISOServerAcceptEvent  (you'd be most interested in the latter).

Not sure this is what you need, but perhaps it can come handy.


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:
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
To view this discussion on the web visit

James Loveday

Sep 18, 2022, 1:01:54 PMSep 18
to jPOS Users


Just wanted to say a huge thanks for your advice, that is implemented and seems to be working as expected 

Used this page as an example, 

Not sure but it would be nice if somebody else finds this solution useful. 

Again many thanks 

Alejandro Revilla

Sep 18, 2022, 5:20:23 PMSep 18

Actually, I forgot about that FAQ page when I drew the diagram about using QServer as a client recently.

Reply all
Reply to author
0 new messages