[jpos-users] Making the SAF multithreaded

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

[jpos-users] Making the SAF multithreaded

mrtechit
Hi,

We are using jpos 1.9.8 and jpos ee 2.0.4.
We use the SAF for failed reversals/settlements.
However, we see that,  for eg there are 100 transactions in the SAF, until the first one gets a approved response, the other 99 are not retried .

Is it possible to implement multithreading so that all transactions are re tried regardless of the first one getting approved / valid response ?

SAF config :

<saf name='saf1' logger='Q2' realm='saf' class='org.jpos.saf.SAF'>
     <property name='space' value='jdbm:saf'/>
    <property name='mux' value='TEST_1_MUX' />
    <property name='flag-retransmissions' value='no'>
        if MTI is in list, messages would be retransmitted as xxx1
    </property>
    <property name='initial-delay' value='60000' />
    <property name='inter-message-delay' value='10000' />
    <property name='wait-for-response' value='60000' />
    <property name='max-retransmissions' value='999999' />
    <property name='expire-after' value='9999999999'>
        in seconds
    </property>
    <property name='valid-response-codes' value='000' />
    <property name='retry-response-codes' value='904,909,907,911,912,999' />
</saf>


PS : We dont want to expire / use max-retransmission

--
--
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/97d127cb-1b7a-4f4e-86d7-901f48438304%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Making the SAF multithreaded

Alejandro Revilla
The general idea behind the SAF is that transactions are stored and forwarded in order. This is particularly important when you send a reversal followed by a force post and things like that, you can't send them in reverse order.



On Thu, Mar 2, 2017 at 4:30 PM, Anirudh Singh <[hidden email]> wrote:
Hi,

We are using jpos 1.9.8 and jpos ee 2.0.4.
We use the SAF for failed reversals/settlements.
However, we see that,  for eg there are 100 transactions in the SAF, until the first one gets a approved response, the other 99 are not retried .

Is it possible to implement multithreading so that all transactions are re tried regardless of the first one getting approved / valid response ?

SAF config :

<saf name='saf1' logger='Q2' realm='saf' class='org.jpos.saf.SAF'>
     <property name='space' value='jdbm:saf'/>
    <property name='mux' value='TEST_1_MUX' />
    <property name='flag-retransmissions' value='no'>
        if MTI is in list, messages would be retransmitted as xxx1
    </property>
    <property name='initial-delay' value='60000' />
    <property name='inter-message-delay' value='10000' />
    <property name='wait-for-response' value='60000' />
    <property name='max-retransmissions' value='999999' />
    <property name='expire-after' value='9999999999'>
        in seconds
    </property>
    <property name='valid-response-codes' value='000' />
    <property name='retry-response-codes' value='904,909,907,911,912,999' />
</saf>


PS : We dont want to expire / use max-retransmission

--
--
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/97d127cb-1b7a-4f4e-86d7-901f48438304%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: [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/CAAgSK%3Dn-en7gHUCQ789%2Bt7DuTQ-U36NPGi7Q54seDxDdNxmvDg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: [jpos-users] Making the SAF multithreaded

Andrés Alcarraz
In reply to this post by mrtechit

The point here is why the first isn't being approved, if it is a system malfunction, then the problem will happen with all the others, if it is because that particular transacction is flawed and has inconsistent data that make it rejected forever, there has no point in keeping resending it forever, so why not setting a timeout or a max-retransmissions?

As Alejandro says, mainting the order is important, but you could implement a version of the SAF that uses a queue for each key that defines a transaction flow, eg (f11,f41). For each message that arrives to the SAF you would need to put it in the corresponding queue, if it does not exists, then you'd have to start a Processor for that queue and terminate it when the queue is empty.

I'm just thinking at loud here, don't know if this is really valid, for example Reconciliation Messages (settlement) should always be processed in order respect to the other messages, so here you would need some careful synchronization.

I don't know if I'm expressing myself well enough, just wanted to share my improvised thoughts

Best regards.

El 02/03/17 a las 16:30, Anirudh Singh escribió:
Hi,

We are using jpos 1.9.8 and jpos ee 2.0.4.
We use the SAF for failed reversals/settlements.
However, we see that,  for eg there are 100 transactions in the SAF, until the first one gets a approved response, the other 99 are not retried .

Is it possible to implement multithreading so that all transactions are re tried regardless of the first one getting approved / valid response ?

SAF config :

<saf name='saf1' logger='Q2' realm='saf' class='org.jpos.saf.SAF'>
     <property name='space' value='jdbm:saf'/>
    <property name='mux' value='TEST_1_MUX' />
    <property name='flag-retransmissions' value='no'>
        if MTI is in list, messages would be retransmitted as xxx1
    </property>
    <property name='initial-delay' value='60000' />
    <property name='inter-message-delay' value='10000' />
    <property name='wait-for-response' value='60000' />
    <property name='max-retransmissions' value='999999' />
    <property name='expire-after' value='9999999999'>
        in seconds
    </property>
    <property name='valid-response-codes' value='000' />
    <property name='retry-response-codes' value='904,909,907,911,912,999' />
</saf>


PS : We dont want to expire / use max-retransmission
--
--
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/97d127cb-1b7a-4f4e-86d7-901f48438304%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: [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/b60ea72e-ff11-eb60-7f47-9679ec5daa9d%40gmail.com.
For more options, visit https://groups.google.com/d/optout.