Grokking Spring Boot
0% completed
Retries and Concurrency Limits
@Retryable(includes = HttpServerErrorException.class, maxRetries = 3, delay = 200, multiplier = 2) @ConcurrencyLimit(limitString = "${booking.payments.concurrency-limit:10}") public PaymentResult charge(String email, int amountInCents, String idempotencyKey) {
These two lines on PaymentClient.charge change how the booking service treats the payment provider. The first says: when the provider answers with a 5xx status, try again up to three more times, waiting longer before each attempt
.....
.....
.....
Like the course? Get enrolled and start learning!
Reading Progress
0%