Here is my sample process and consume bean which I have set in function binding in application
I would like to add a circuit breaker to these functions but it won't work since these beans are just being read during project build. Goal is: I would like my circuit breaker to capture all exceptions that will be encountered during the stream before I get the message from kafka topic. sample exceptions(when kafka is down, deserialization) I would like to capture all of them in circuit breaker so I can pause/start kafka when circuit is open.
Btw, I have already implemented it on my service layer the part where business logic will occur. But that is only limited to the exceptions on my service and won't be able to capture all the exceptions in the stream.
The circuit breaker I'm using and needed to use is from spring.retry.