Skip to content

Reprocessing Scheduler

Overview

The Reprocessing Scheduler is a WSO2 cron utility job that reruns failed message payloads based on configured intervals.

The retry interval logic is based around endpoints. Attempt limits and interval are tied to the endpoint that failed. The concept is similar to WSO2 retry handling, although the actual feature is not used.

Reprocessing config

The scheduler will determine the retry interval based on defaults of ReprocessingEndpointConfig table.

Example:

EndpointType EndpointName Operation MaxAttempts IntervalInMilliseconds MaxIntervalInMilliseconds BackOffFactor
NULL NULL NULL 5 300000 12000000 1.8
CoreServices TrnAdd NULL 3 2000000 86400000 1.1
CoreServices TrnAdd ReverseOutboundPayment 4 2000000 86400000 1.1

1st row: By default, endpoint failures will retry after 5 minutes with a backoff of 1.8 up to 5 attempts.

# result is in seconds
0..4 | %{300000 *  [Math]::Pow(1.8, $_)} | %{$_ / 1000  }
300
540
972
1749.6
3149.28

2nd row: TrnAdd endpoint failures will retry after 333 minutes (5.5 hours) with a backoff of 1.1 up to 3 attempts.

# result is in hours
0..2 | %{20000000 *  [Math]::Pow(1.1, $_)} | %{$_ / 1000 / 60 / 60}
5.55555555555556
6.11111111111111
6.72222222222222

3rd row: Same as the 2nd row, but one additional retry specific to the ReverseOutboundPayment UC.

ReprocessingEndpointConfig

Field Name Type Desc
EndpointType varchar Category of endpoint 1
EndpointName varchar Specific endpoint 2
OperationId tinyint Sequence name
MaxAttempts int Current attempts for this endpoint
IntervalInMilliseconds int Retry interval in ms
MaxIntervalInMilliseconds int Max retry interval
BackoffFactor decimal Multiplier, which increases the retry interval exponentially. 3
CreatedAt datetime2
ModifiedAt datetime2

Activity Diagram

file


  1. CoreServices, PCS, PaymentServices, EWS 

  2. Example: TrnAdd, GetPayments 

  3. Formula: wait_interval = base * multiplier^n