I am using exponential retry in Kafka consumer. And it is working as expected but I need to add some more configuration to it. Suppose after the maximum retry attempt, the request is still not successful then I need to retry it for a fixed time thereafter.
Suppose the multiplier is 2 and the maximum retry attempt is 4 with an initial retry interval 1sec
Then retry sequence will be
1sec, 2 sec, 4 sec, 8 sec.
After the fourth attempt, I need retry to occur at a fixed interval (say after each 10sec) until the request is successful.
Is there any way I can achieve this?
How to retry for fixed amount of time after all previous retries are exhausted in Kafka consumer?
845 views Asked by Suhaas At
1
There are 1 answers
Related Questions in SPRING-BOOT
- Multi Tenancy in Spring - Partitioned Data Approach
- I have created a spring boot application with spring data JPA, Rest ,oracle and i am getting this ORA-00933: SQL command not properly ended
- Springboot: How to get an entity optional property and check null?
- How to create jasper report in spring boot rest api with jpa
- JSON Body is Not Passing Certain Strings
- Unresolved reference error is showing up after adding the dgs codegen plugin successfully
- Transaction silently rolled back
- JPA buddy error when generating JPA Entities from DB
- Migrating Spring Boot 2 to 3 throws org.glassfish.jaxb.runtime.v2.runtime.IllegalAnnotationsException: 3 counts of IllegalAnnotationExceptions
- Hibernate SQL Error: Missing FROM-clause entry for table "th1_1"
- Appwrite and / or Spring Boot Backend
- Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. I'm using Postgresql
- Driver com.microsoft.sqlserver.jdbc.SQLServerDriver claims to not accept jdbcUrl, ${SPRING_DATASOURCE_URL}: GitHub Actions
- springboot class org.hibernate.mapping.Bag cannot be cast to class org.hibernate.mapping.SimpleValue
- Spring security causing 404 with message "No static resource login"
Related Questions in APACHE-KAFKA
- No method found for class java.lang.String in Kafka
- How to create beans of the same class for multiple template parameters in Spring
- Troubleshoot .readStream function not working in kafka-spark streaming (pyspark in colab notebook)
- Handling and ignore UNKNOWN_TOPIC_OR_PARTITION error in Kafka Streams
- Connect Apache Flink with Apache kudu as sink using Pyflink
- Embedded Kafka Failed to Start After Spring Starter Parent Version 3.1.10
- Producer Batching Service Bus Vs Kafka
- How to create a docker composer environment where containers can communicate each other?
- Springboot Kafka Consumer unable to maintain connect to kafka cluster brokers
- Kafka integration between two micro service which can respond back to the same function initiated the request
- Configuring Apache Spark's MemoryStream to simulate Kafka stream
- Opentelemetry Surpresses Kafka Produce Message Java
- Kafka: java.lang.NoClassDefFoundError: Could not initialize class org.apache.logging.log4j.core.appender.mom.kafka.KafkaManager
- MassTransit Kafka producers configure to send several events to the same Kafka topic
- NoClassDefFoundError when running JAR file with Apache Kafka dependencies
Related Questions in APACHE-KAFKA-STREAMS
- Handling and ignore UNKNOWN_TOPIC_OR_PARTITION error in Kafka Streams
- spring-cloud-stream-binder-kafka-streams consumer shuts down when RuntimeException occurs
- Is there a way to sync applications having kafka stream to avoid duplicate message processing?
- Kafka Streams: Efficient Batch Collection and State Store Management
- Springboot kafka consumer dies permanently
- Understanding the requirements for a Kafka streams application
- Kafka Streams topology initially dropping messages to intermediate topics
- "ConfigException: Please specify a key serde or set one" although I've specified it and also set a default one in my Spring Boot + Kafka Stream app
- Kafka Streams: Kafka Stream Application getting intermittent SaslAuthenticationException
- Switch between Kafka topics
- How to insert a time/data filtered Kafka Stream into a Postgres Database
- Calling POST Rest API in kafka streams application
- Using TopologyTestDriver for testing Biconsumer
- Filtering and forwarding Kafka messages based on key alone with Kafka Streams
- How to write BatchProcessor for lambda with Kafka trigger in AWS?
Related Questions in SPRING-RETRY
- How does spring-retry determine which methods to retry when @Retryable is placed at the class level?
- How to get the label specified in spring retryable annotation at class level in a MethodInvocationRetryListenerSupport?
- Duplicate message coming to @Dlthandler multiple times even after acknowledging msg
- Spring Retry Recovery attached to a service activator is not part of the processing chain
- Spring -@Recover Cannot locate recovery method exception
- Retryable within transaction
- How can we create a retry mechanism if there is an error in the spring boot db connection?
- spring boot retry connecting to database untill connection works
- Retry method considering its result
- Is it possible to add Spring Retry information (counters for number of attempts, successes, failures, timeouts) to Actuator?
- Spock test fails, RetrySynchronizationManager.getContext() is null
- Spring Retry Junit throws Checked exception is invalid for this method! is thrown
- Spring @Retryable annotation not working in spring boot application
- Implementing Spring Kafka retry
- Testing Spring Retry with Feign client
Related Questions in EXPONENTIAL-BACKOFF
- How to patch @backoff decorator in Python
- Retry Mechanism
- Firebase Cloud Function: Retry behaviour and backoff times
- How to resolve the error code 503 and 429 while reading all locations of all accounts using Google My Business Information API in Java
- Polly DecorrelatedJitterBackoffV2 - how calculate max time required to complete all retries?
- Spring-retry UniformrandomBackOff vs ExponentialRandomBackoff
- Internal error from Google Pub/Sub when trying to update
- How do I retry an aws neptune gremlin ConcurrentModificationException error without having to rebuild the query?
- Unit test for exponential backoff in Golang
- Delayed Restart is not working while using BackoffSupervisor in Akka Classic Actors (Scala)
- Backoff.DecorrelatedJitterBackoffV2, 1 second start, max around 32 sec in waits, with failFast
- WebFlux backoff and multi-threading in a kafka consumer flow
- Polly C# retry exponentially for 3 tries then switch to retrying every hour
- Python While Loop attempts restart to 0 if successful
- Where to implement Exponential Backoff algorithm in a Controller-worker system?
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Assuming you are using the
ExponentialBackOffPolicyin theRetryTemplate, you can set itsmaxIntervalproperty.If you are using a
SeekToCurrentErrorHandlerwith anExponentialBackOffinstead (which is preferred with modern versions of spring-kafka - to avoid a rebalance), it, too, has amaxIntervalproperty.