Package io.debezium.heartbeat
Interface Heartbeat
- All Superinterfaces:
AutoCloseable
- All Known Subinterfaces:
Heartbeat.ScheduledHeartbeat
- All Known Implementing Classes:
CompositeHeartbeat,DatabaseHeartbeatImpl,HeartbeatImpl
A class that is able to emit heartbeat messages. The clients are
supposed to call method
emit(Map, OffsetContext) from a main loop of a connector.- Author:
- Jiri Pechanec
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceReturns the offset to be used when emitting a heartbeat event.static interfaceA class that is able to generate periodic heartbeat messages based on a pre-configured interval. -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptiondefault voidclose()default voidemit(Map<String, ?> partition, OffsetContext offset) Generates a heartbeat record unconditionallydefault voidforcedBeat(Map<String, ?> partition, Map<String, ?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Deprecated.default voidheartbeat(Map<String, ?> partition, Heartbeat.OffsetProducer offsetProducer, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Deprecated.default voidheartbeat(Map<String, ?> partition, Map<String, ?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Deprecated.booleanWhether heartbeats are enabled or not.
-
Field Details
-
HEARTBEAT_INTERVAL_PROPERTY_NAME
- See Also:
-
HEARTBEAT_INTERVAL
static final io.debezium.config.Field HEARTBEAT_INTERVAL -
HEARTBEAT_TOPICS_PREFIX
static final io.debezium.config.Field HEARTBEAT_TOPICS_PREFIX -
DEFAULT_NOOP_HEARTBEAT
No-op Heartbeat implementation (not enabled)
-
-
Method Details
-
heartbeat
@Deprecated default void heartbeat(Map<String, ?> partition, Map<String, throws InterruptedException?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Deprecated.Generates a heartbeat record if defined time has elapsed Replaced byHeartbeat.ScheduledHeartbeat.emitWithDelay(Map, OffsetContext)- 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
-
heartbeat
@Deprecated default void heartbeat(Map<String, ?> partition, Heartbeat.OffsetProducer offsetProducer, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) throws InterruptedExceptionDeprecated.Generates a heartbeat record if defined time has elapsed Replaced byHeartbeat.ScheduledHeartbeat.emitWithDelay(Map, OffsetContext)- Parameters:
partition- partition for the heartbeat recordoffsetProducer- lazily calculated offset for the heartbeat recordconsumer- - a code to place record among others to be sent into Connect- Throws:
InterruptedException
-
forcedBeat
@Deprecated default void forcedBeat(Map<String, ?> partition, Map<String, throws InterruptedException?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) Deprecated.Generates a heartbeat record unconditionally Replaced byemit(Map, OffsetContext)- 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
-
emit
Generates a heartbeat record unconditionally- Parameters:
partition- partition for the heartbeat recordoffset- offset for the heartbeat record- Throws:
InterruptedException
-
isEnabled
boolean isEnabled()Whether heartbeats are enabled or not. -
close
default void close()- Specified by:
closein interfaceAutoCloseable
-