Replies: 1 comment
-
Please, don't repeat questions in different forums which are indeed monitored by the team. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a spring boot application written in java which has a kafka listener:
The circuit breaker (resilience4j) configuration is highlighted below. The circuitBreaker which is being used above is the last thing being configured in the code-block below.
If the circuit breaker encounters the first exception the event publisher
onStateTransition
code is triggered and therefore pausing is requested for the kafka listener container. The next thing I see in the logs is that all kafka partitions are revoked and partitions are assigned again. In between the partition assignment messages I see the following:The problem is the kafka listener container is no longer paused but also does not resume listening to the topic. I would like to properly pause the kafka listener container and resume it once the circuit breaker transitions to a corresponding state. What is the best way to accomplish this? I want to accomplish a pausing of the kafka listener without causing a rebalance. Scenario: two pods of this spring boot java application running in a kubernetes cluster and the kafka listener of one of those pods runs into temporary problem processing messages (e.g. persisting to database due to connection issue) and therefore should stop processing messages until the circuit breaker deems it ok to resume.
stackoverflow question: https://stackoverflow.com/questions/79185634/best-way-to-use-circuitbreaker-in-kafka-listener
Beta Was this translation helpful? Give feedback.
All reactions