How to send transaction requests to acquirer host in sequential

126 views
Skip to first unread message

Durga Prasad

unread,
Apr 26, 2017, 12:03:49 PM4/26/17
to jPOS Users

How to handle multiple transaction requests from different POS machines(May have same TID) where we need to send transaction requests in sequential based on TID.
T1  --- P1
T2  --- P1
T1,T2 are transactions request
P1 is TID (DE:41)
here t1 aad t2 approached same time but it should be processed one after other. Could you please suggest how can we achieve this in JPOS?

Alejandro Revilla

unread,
Apr 26, 2017, 2:17:58 PM4/26/17
to jPOS Users
If you use a TransactionManager and you set sessions to just one, then all transactions would get serialised.

Makes little sense in the real world to me, can you explain the use case? I'm not sure that's exactly what you want...



--
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/6693389d-a956-4d3e-909f-3044652fb38b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

DP

unread,
Apr 27, 2017, 2:49:28 AM4/27/17
to jPOS Users
Thanks for your prompt reply.

Here is the use case.

Let's say our host be X, Acquirer Host(Bank) be Y. Terminals T1,T2,T3... Tn are terminals where each terminal is identified by Host X.

Mesage format between terminals and X will be in some predefined format(Not Iso 8583). Acquirer Host Y gives only Acquirer terminal Id(DE:41) and MerchantId(DE:42) in Merchant on boarding process.

In our system X, we have a mapping system where bunch of terminals are mapped to same acquirer TID. At Y point of view, transactions are getting processed on single TID. In other words, its called as Host-to-Host integration(X-to-Y) .

Our terminals talk to our host X and host X builds data as per Y format i.e., iso8583 format and forwards this is to Host Y for processing. This is how our system is designed. But we are having issue when Host X sends multiple requests at same time to Host Y of same TID. When we reviewed the logs and understood that on same acquirer TID transaction requests should be processed one by one.

If multiple requests are sent at same time we are unable to receive response from host like we are getting read time out. But we need to understand the point here is, at acquirer host, transaction is processed successfully but our host is unable to receive the response. Therefore we are getting batch settlement issue at EOD because totals amounts and no.of transactions are mismatched.

Please note Host X is an web-application deployed in Tomcat, we use jpos only for constructing the message in ISO-8583, posting to acquirer host(Nacchannel).

Please suggest how do we handle using jpos? QMUX serves this purpose? Let me know your feedback. Thanks


Regards,
DP


On Wednesday, April 26, 2017 at 11:47:58 PM UTC+5:30, Alejandro Revilla wrote:
If you use a TransactionManager and you set sessions to just one, then all transactions would get serialised.

Makes little sense in the real world to me, can you explain the use case? I'm not sure that's exactly what you want...



On Wed, Apr 26, 2017 at 1:03 PM, Durga Prasad <dp....@gmail.com> wrote:

How to handle multiple transaction requests from different POS machines(May have same TID) where we need to send transaction requests in sequential based on TID.
T1  --- P1
T2  --- P1
T1,T2 are transactions request
P1 is TID (DE:41)
here t1 aad t2 approached same time but it should be processed one after other. Could you please suggest how can we achieve this in JPOS?

--
--
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.

chhil

unread,
Apr 27, 2017, 3:12:46 AM4/27/17
to jPOS Users

So the only reason you think you need to process them one after the other in a sequential manner is because your host X is not receiving responses from the Y?

You ask about using a Qmux, how are you handling it right now?
Are you using the channel to send and receive messages directly?

You should use the qmux to send and receive. The qmux handles the matching of requests to responses based on field 11 +field 41.
So if the order is not important then this will work. If the order is important then you need to make sure your transaction manager uses 1 session to make everything process sequentially.

-chhil.


Sumeet Phadnis

unread,
Apr 27, 2017, 6:23:19 AM4/27/17
to jpos-...@googlegroups.com
Consider using SAF, one per TID.

To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/44d1828a-ea5a-499e-893b-c41a87052ff7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

DP

unread,
Apr 28, 2017, 6:48:12 AM4/28/17
to jPOS Users

So the only reason you think you need to process them one after the other in a sequential manner is because your host X is not receiving responses from the Y?
No. Host Y is expecting transactions in sequence of same TID. If there are multiple TIDs sending transactions at same time then there is no issue.

You ask about using a Qmux, how are you handling it right now?
No, we are not handling QMUX.

Are you using the channel to send and receive messages directly?
Yes. we are using NACChanel. For every request received by host X will make a new connection with Host Y.


You should use the qmux to send and receive. The qmux handles the matching of requests to responses based on field 11 +field 41
 I'm not using qmux. We are setting timeout value as 'channel.setTimeout(30*1000). If we don't receive response with in 30 seconds then we fire reversal.


So if the order is not important then this will work. If the order is important then you need to make sure your transaction manager uses 1 session to make everything process sequentially.
Are you saying using we use transaction manager serves the purpose?. Please note Transactons with different acquirer TID's should be processed concurrently not sequential.

DP

unread,
Apr 28, 2017, 6:51:25 AM4/28/17
to jPOS Users
Can you explain little detail? Assuming SAF means store and forward. Our host needs to reply back to terminal with in same session or same thread.

--
--
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 post to this group, send email to jpos-...@googlegroups.com.

chhil

unread,
Apr 28, 2017, 7:30:04 AM4/28/17
to jPOS Users

Since you only need to send the same TID requests sequentially, you will need to somehow determine the requests need to be ordered based on TIDs and process them using a txn mgr that has one session and let the others process through a txn mgr with multiple sessions.

Your not using a qmux is part of the problem. You setting a channel timeout is not sufficient. You probably have many sessions in your txn mgr and the participant that does the channel send. The receive does not guarantee its the response for the request you sent out. You must use a qmux to avoid this.

Earlier a SAF suggestion was made but that is more of an out of band processing where you don't have control of the response. Saf does process requests sequentially but they are not in your control once you do a send on them. So it may not be the solution you are looking for.

-chhil


Victor Salaman

unread,
Apr 28, 2017, 7:50:27 AM4/28/17
to jpos-...@googlegroups.com
First, you should try to get rid of the sub-optimal design and do a 1-to-1 mapping between X host and Y host. If that's not possible, at least I'd try moving to QMUX. At least in that scenario, you could **easily** check if there's a pending in transit transaction with the TID you are submitting the message for, so you'd get exactly what you need, which is to NEVER have more than 1 transaction pending for a SINGLE TID.

/V

To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jpos-users/ad12e83f-bf28-4362-93af-150b811fd306%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

DP

unread,
Apr 28, 2017, 8:14:03 AM4/28/17
to jPOS Users
Thanks for your reply.

Please note neither I'm using transaction manager nor qmux in my application.However, I've sameple code for reference. Please let me know how can we use QMUX without using or starting Q2 service.

Regards,
DP
sample.java

Victor Salaman

unread,
Apr 28, 2017, 8:23:43 AM4/28/17
to jpos-...@googlegroups.com
Why not join our Slack channel?

/V

To unsubscribe from this group and stop receiving emails from it, send an email to jpos-users+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.

DP

unread,
Apr 28, 2017, 8:34:37 AM4/28/17
to jPOS Users
Please add me.

DP

unread,
Apr 28, 2017, 8:45:18 AM4/28/17
to jPOS Users
dp....@gmail.com is my email

Alejandro Revilla

unread,
Apr 28, 2017, 2:50:23 PM4/28/17
to jPOS Users
I sent you an invite.



Stephen McClain

unread,
Apr 28, 2017, 2:53:33 PM4/28/17
to jpos-...@googlegroups.com

Alejandro,

 

Who is the intended recipient of this email?

--

--
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 post to this group, send email to jpos-...@googlegroups.com.

Alejandro Revilla

unread,
Apr 28, 2017, 3:00:06 PM4/28/17
to jPOS Users
Please see the dialogue here:


Inline image 1

It was a Slack invite suggest by Victor, requested by DP.

Do you want to get one too? Anybody else? Feel free to email me directly (a...@jpos.org)




On Fri, Apr 28, 2017 at 3:52 PM, Stephen McClain <stephen...@advance-auto.com> wrote:

Alejandro,

 

Who is the intended recipient of this email?

 

From: jpos-...@googlegroups.com [mailto:jpos-users@googlegroups.com] On Behalf Of Alejandro Revilla
Sent: Friday, April 28, 2017 2:50 PM
To: jPOS Users
Subject: [EXTERNAL] Re: [jpos-users] How to send transaction requests to acquirer host in sequential

 

I sent you an invite.

 

 

 

--
--
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+unsubscribe@googlegroups.com.

--
--
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+unsubscribe@googlegroups.com.

To post to this group, send email to jpos-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages