davsclaus commented on code in PR #27507:
URL: https://github.com/apache/camel/pull/27507#discussion_r4210249685
##########
components/camel-debezium/camel-debezium-common/camel-debezium-common-component/src/main/java/org/apache/camel/component/debezium/DebeziumConsumer.java:
##########
@@ -115,10 +117,20 @@ Throwable getEngineFailure() {
return engineFailure;
}
+ boolean isEngineReady() {
+ return engineReady;
+ }
+
private DebeziumEngine<ChangeEvent<SourceRecord, SourceRecord>>
createDbzEngine() {
return DebeziumEngine.create(Connect.class)
.using(configuration.createDebeziumConfiguration().asProperties())
.using(this::onEngineCompleted)
+ .using(new DebeziumEngine.ConnectorCallback() {
+ @Override
+ public void pollingStarted() {
+ engineReady = true;
+ }
+ })
Review Comment:
Optional: `engineReady` is never cleared once set. If the engine completes
successfully on its own (not on request), the check keeps reporting `UP` while
no change events are consumed. That was already the case before this PR, but
overriding `pollingStopped()` would close it cheaply:
```java
@Override
public void pollingStopped() {
engineReady = false;
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]