Two way channel

67 views
Skip to first unread message

Jeronimo Paoletti

unread,
Sep 5, 2022, 8:58:40 AM9/5/22
to jPOS Users
Hi guys, It's been a long time. Hope you are all well.

I'm struggling with a concept I've never faced before for a potential new project. I've the classical gateway scenario "Client <-> jPOS GW <-> Some nasty ISO server" and with the classical configuration client <-> qserver <-> TXNMGR <-> Mux <-> Channel. So far so good.

Now the thing is that I get messages from the server as well (0800). I can see them in the log but I'm unable to figure out how I can respond to them. I'd like to process those messages in a second transaction manager (let's say TXNMGR2) but I can't figure out how I can do that. 

Any suggestions?

Best regards.

--
Lic. Jerónimo Paoletti 

igor skljar

unread,
Sep 5, 2022, 10:34:52 AM9/5/22
to jPOS Users

Hi

You can use Forward participant to send msg to the second TNXMGR2. but it's too much for that simple task.

Something like this will be enough.

<participant class="org.jpos.transaction.participant.SwitchMti" logger="Q2" realm="Switch">
<property name="0800" value="network" />
...
</participant>

<group name="network">
<participant class="org.jpos.transaction.participant.SetResponse">
<property name="response" value="00" />
</participant>
<participant class="org.jpos.transaction.participant.SendResponse"/>
</group>
понедельник, 5 сентября 2022 г. в 15:58:40 UTC+3, jpaoletti:

Alejandro Revilla

unread,
Sep 5, 2022, 10:39:33 AM9/5/22
to jpos-...@googlegroups.com
Hey Yero! 

That's one option, the other one, simpler, is to add a RequestListener to your MUX. The RequestListener will receive all requests coming to the MUX that do not match an inflight transaction.

To give an example, if you send a 200, the MUX is waiting for the response of the 210 (matching the MUX key, for example, field 41 and 11).

If there's a 800 coming, the MUX is not waiting for it, so it will send it to the RequestListener (if configured for the MUX).

Something worth noting is that if the former 210 comes late, it will also be handed to the RequestListener, so you need to be prepared for those late responses (you can use ISOMsg.isRquestMTI() in order to tell apart requests from responses).



--
--
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: sa...@jpos.org
---
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 jpos-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/9a691c6a-b007-4d39-a1e0-28e606e39213n%40googlegroups.com.

Jeronimo Paoletti

unread,
Sep 5, 2022, 10:54:55 AM9/5/22
to jpos-users, Alejandro Revilla
Thank you both for your responses. 

Following @Alejandro Revilla suggestion, I've found that QMUX has a property called "unhandled". Maybe I can add to the qmux configuration something like 

<unhandled>TXNMGR2</unhandled>

How it looks like? I'd like to use a second txnmgr in order to properly attend the incoming messages.

--
Lic. Jerónimo Paoletti 


Alejandro Revilla

unread,
Sep 5, 2022, 11:03:42 AM9/5/22
to Jeronimo Paoletti, jpos-users
You can, but beware that in that case, the TXNMGR2 will receive an ISOMsg instead of a Context.

I'd use a RequestListener using the IncomingListener ISORequerstListener implementation (https://github.com/jpos/jPOS/blob/master/jpos/src/main/java/org/jpos/iso/IncomingListener.java) and that IncomingListener can create a Context for you, and push it to your TXNMGR2 queue.


Jeronimo Paoletti

unread,
Sep 5, 2022, 11:09:12 AM9/5/22
to Alejandro Revilla, jpos-users
Nice ! I'll give it a try. Thank you and buenas guitarreadas :)

--
Lic. Jerónimo Paoletti 

Reply all
Reply to author
Forward
0 new messages