kafka-retry | Spring Boot microservice providing generic Kafka message retry capability | Microservice library
kandi X-RAY | kafka-retry Summary
kandi X-RAY | kafka-retry Summary
In a microservices architecture it is common for applications to communicate via an asynchronous messaging system. A common choice of messaging system is Apache Kafka.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
- Returns true if the given request should be retried
- Determines if the retry count is exceeded
- Determine if the name of the given exception is matching
- Get the maximum number of retries
- Initialize the stateStores
- Initialize state stores
- Configures the retry scheduler
- Returns true if the given headers are retried
- Returns true if the given exception type matches the exception type
- Main entry point
- Returns the exception message
- Send message to origin topic
- Dispatches the message based on the configured retry attempts
- Send message to permanent failure topic
- Drops a message
- Adds a message to the retry queue
- Process a JSON stream message
- Dispatch a message to permanent failure topic
- Handles a message
- Removes a message from the retry queue
- Create the retry headers
- Queues a message for retry
- Gets queued messages from the message store
- Get the minimum dispatch time
- Returns the number of retries
- Determine if the message should be dropped or not
kafka-retry Key Features
kafka-retry Examples and Code Snippets
Community Discussions
Trending Discussions on kafka-retry
QUESTION
As described in the documentation, an offset should only be committed when I actually commit (When AckMode.MANUAL_IMMEDIATE or AckMode.MANUAL) or at the end of the listener execution when AckMode.RECORD, however, in the middle of processing the method annotated with @KafkaListener the application goes down, the message is not re-delivered, the application starts reading from the next valid message and this current message is lost (message that was being processed when the application was restarted), how do I achieve the goal of the application reprocessing an uncommitted message when the application is restarted in the middle of processing? I have also tried configuring AUTO_OFFSET_RESET_CONFIG as earliest, latest and none without success in the 3 models. For testing purposes, I created a topic with just one partition, I forced the listener to use the container factory that I define manually. The springboot-version 2.2.6
...ANSWER
Answered 2020-Apr-15 at 14:58The offset will not be committed until the acknowledgment.acknowledge()
is called. Set the commitLogLevel
container property to DEBUG
to see commit activity.
auto.offset.reset
only applies if the consumer has never committed an offset (new consumer groups only).
If you can't figure it out from the log; edit the question with the log snippet.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install kafka-retry
You can use kafka-retry like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the kafka-retry component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page