-
Hey all, we're running a few Quarkus applications that are both connected to a database, and process Kafka messages. Processing of the messages involves interacting with the DB. So if the DB is unavailable, all processing will inevitably fail. Both the DB connection pool and the Kafka consumer have independent health checks. What we'd like to achieve is to pause the Kafka consumer when the database health check starts failing, and resume it again once the database health check succeeds again. Consumers do have failure handling and retries, but we would like to avoid producing errors in the first place. Ideally, each health check would publish an event to an internal event bus when its state changes, so other components of the app get an opportunity to gracefully pause / resume their work. I think this can be achieved with custom health checks and vert.x event bus, but it won't work for the default health checks (e.g. Anyone have ideas how to best go about this? Are there any best practices around this kind of thing? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Hi @nscuro. Not sure I understand what you're after. But all HCs are CDI beans. So is this what you mean?
|
Beta Was this translation helpful? Give feedback.
Hi @nscuro. Not sure I understand what you're after. But all HCs are CDI beans. So is this what you mean?
@HealthGroup("testHC")
because I don't want it to…