Package io.debezium.heartbeat
Class DatabaseHeartbeatImpl
java.lang.Object
io.debezium.heartbeat.HeartbeatImpl
io.debezium.heartbeat.DatabaseHeartbeatImpl
- All Implemented Interfaces:
Heartbeat,AutoCloseable
Implementation of the heartbeat feature that allows for a DB query to be executed with every heartbeat.
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.heartbeat.Heartbeat
Heartbeat.OffsetProducer -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final HeartbeatErrorHandlerstatic final Fieldstatic final Stringprivate final Stringprivate final JdbcConnectionprivate static final org.slf4j.LoggerFields inherited from class io.debezium.heartbeat.HeartbeatImpl
DEFAULT_HEARTBEAT_INTERVAL, DEFAULT_HEARTBEAT_TOPICS_PREFIXFields inherited from interface io.debezium.heartbeat.Heartbeat
DEFAULT_NOOP_HEARTBEAT, HEARTBEAT_INTERVAL, HEARTBEAT_INTERVAL_PROPERTY_NAME, HEARTBEAT_TOPICS_PREFIX -
Constructor Summary
ConstructorsConstructorDescriptionDatabaseHeartbeatImpl(Duration heartbeatInterval, String topicName, String key, JdbcConnection jdbcConnection, String heartBeatActionQuery, HeartbeatErrorHandler errorHandler, SchemaNameAdjuster schemaNameAdjuster) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()voidforcedBeat(Map<String, ?> partition, Map<String, ?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Generates a heartbeat record unconditionalyMethods inherited from class io.debezium.heartbeat.HeartbeatImpl
heartbeat, heartbeat, isEnabled
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
HEARTBEAT_ACTION_QUERY_PROPERTY_NAME
- See Also:
-
HEARTBEAT_ACTION_QUERY
-
heartBeatActionQuery
-
jdbcConnection
-
errorHandler
-
-
Constructor Details
-
DatabaseHeartbeatImpl
DatabaseHeartbeatImpl(Duration heartbeatInterval, String topicName, String key, JdbcConnection jdbcConnection, String heartBeatActionQuery, HeartbeatErrorHandler errorHandler, SchemaNameAdjuster schemaNameAdjuster)
-
-
Method Details
-
forcedBeat
public void forcedBeat(Map<String, ?> partition, Map<String, throws InterruptedException?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Description copied from interface:HeartbeatGenerates a heartbeat record unconditionaly- Specified by:
forcedBeatin interfaceHeartbeat- Overrides:
forcedBeatin classHeartbeatImpl- Parameters:
partition- partition for the heartbeat recordoffset- offset for the heartbeat recordconsumer- - a code to place record among others to be sent into Connect- Throws:
InterruptedException
-
close
public void close()
-