Wait in close() method for engine shutdown [DBZ-8733]
- Dominant language
- HTML
- Stars
- 6
- Forks
- 8
- Avg merge
- 2d 19h
- Merged PRs (30d)
- 1
Description
Migrated from [DBZ-8733](https://issues.redhat.com/browse/DBZ-8733)
When 3rh party application (it can be e.g. Debezium server) calls async engine {{close()}} method, if the engine is already shutting down (typically because exception was thrown), the method immediately throws {{IllegalStateException}} because engine is already shutting down. However, in such case the applications cannot easily determine when engine shut down. The only way seems to be via {{DebeziumEngine.CompletionCallback}}, which is for this particular case little bit cumbersome.
Consider converting {{close()}} method into a blocking call, which would wait for engine to finish the shutdown instead of throwing exception.
Another possibility is to add an easy way how to check the engine state. This would require adding method into Debezium engine API, but this would become handy also in tests.
Contributor guide
Assessment
This issue has not been assessed yet.