-
Bug
-
Resolution: Done
-
Critical
-
1.2.1.Final, 1.2.2.Final
-
None
See the class: io.debezium.connector.postgresql.PostgresStreamingChangeEventSource.
In the finnaly block of function execute(ChangeEventSourceContext context), the replicationStream is closed.
In the function commitOffset(Map<String, ?> offset), {{replicationStream.flushLsn(lsn) is called.
As the execute method is running in an additional thread, in my case replicationStream is always closed before the last time of replicationStream.flushLsn(lsn) is called when closing the debeziumEngine. And an error is reported on the console:
Error while trying to stop the task and commit the offsets
{ {org.apache.kafka.connect.errors.ConnectException: org.postgresql.util.PSQLException: Database connection failed when writing to copy}}