Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(retry): disable retry for blocking exceptions #370

Merged
merged 7 commits into from
Dec 1, 2023
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,11 @@
<artifactId>opentelemetry-semconv</artifactId>
<version>1.27.0-alpha</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-yaml</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
Expand Down
98 changes: 93 additions & 5 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,89 @@
resilience4j.retry:
instances:
getPaymentRequestInfo:
maxAttempts: 3
waitDuration: 2s
enableExponentialBackoff: false
newTransaction:
maxAttempts: 3
waitDuration: 2s
enableExponentialBackoff: false
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
getTransactionInfo:
maxAttempts: 3
waitDuration: 2s
enableExponentialBackoff: false
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
requestTransactionAuthorization:
maxAttempts: 3
waitDuration: 2s
enableExponentialBackoff: false
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
updateTransactionAuthorization:
maxAttempts: 3
waitDuration: 2s
enableExponentialBackoff: false
activateTransaction:
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
cancelTransaction:
maxAttempts: 3
waitDuration: 2s
enableExponentialBackoff: false
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
addUserReceipt:
maxAttempts: 3
waitDuration: 2s
enableExponentialBackoff: false
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException

resilience4j.circuitbreaker:
configs:
Expand All @@ -37,10 +97,38 @@ resilience4j.circuitbreaker:
instances:
transactions-backend:
baseConfig: default
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
node-backend:
baseConfig: default
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
ecommerce-db:
baseConfig: default
ignoreExceptions:
- it.pagopa.transactions.exceptions.UnsatisfiablePspRequestException
- it.pagopa.transactions.exceptions.PaymentNoticeAllCCPMismatchException
- it.pagopa.transactions.exceptions.TransactionNotFoundException
- it.pagopa.transactions.exceptions.AlreadyProcessedException
- it.pagopa.transactions.exceptions.NotImplementedException
- it.pagopa.transactions.exceptions.InvalidRequestException
- it.pagopa.transactions.exceptions.TransactionAmountMismatchException
- it.pagopa.transactions.exceptions.NodoErrorException
- it.pagopa.transactions.exceptions.InvalidNodoResponseException
giovanniberti marked this conversation as resolved.
Show resolved Hide resolved

Loading