0

2020欧洲杯时间表I am trying to stop the retires for my spring boot cloud application completely or retry for only specific exceptions

2020欧洲杯时间表I have tried several ways to completely stop it from retrying 3 times I set the following configuration but even then it retires

spring.cloud.stream.bindings.input.consumer.max-attempts=1

spring.cloud.stream.rabbit.bindings.input.consumer.requeue-rejected=true

To retry for specific exceptions I used below code but didn't work out it still tries to retry for exceptions I don't want to

cloud:
      stream:
         rabbit:
            bindings:
               input:
                  consumer:
                     autoBindDlq: true
                     republishToDlq: true
                     prefix: local-
                     maxAttempts: 3
                     backOffInitialInterval: 1000
                     backOffMaxInterval: 10000
                     backOffMultiplier: 2.0
                     defaultRetryable: true
                     retryableExceptions:
                        com.ss.*: true
                        java.lang.*: false 

Any idea on how to make it not retry or retry for specific exceptions

  • 1
    We don't support wild cards. "A map of Throwable class names in the key and a boolean in the value. Specify those exceptions (and subclasses) that will or won’t be retried. Also see defaultRetriable. Example: spring.cloud.stream.bindings.input.consumer.retryable-exceptions.java.lang.IllegalStateException=false.". Also with 'defaultRetriable" don't you actually want to set it to false for your use case? – Oleg Zhurakousky Apr 3 at 10:16
  • Hi Oleg, I was actually giving full exception in code, and I tried defualtRetriable:false – coder Apr 3 at 13:51
  • defaultRetryable: false retryableExceptions: java.lang.RuntimeException: true java.lang.IllegalStateException: false defaultRetryable: false retryableExceptions: java.lang.RuntimeException: true java.lang.IllegalStateException: false – coder Apr 3 at 13:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.