public interface Heartbeat
heartbeat(Consumer) from a main loop of a connector.| Modifier and Type | Field and Description |
|---|---|
static Field |
HEARTBEAT_INTERVAL |
static Field |
HEARTBEAT_TOPICS_PREFIX |
static Heartbeat |
NULL
No-op Heartbeat implementation
|
| Modifier and Type | Method and Description |
|---|---|
static Heartbeat |
create(Configuration configuration,
String topicName,
String key,
Supplier<OffsetPosition> positionSupplier)
Provide an instance of Heartbeat object
|
void |
heartbeat(BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer)
Generates a heartbeat record if defined time has elapsed
|
void |
heartbeat(Consumer<org.apache.kafka.connect.source.SourceRecord> consumer)
Generates a heartbeat record if defined time has elapsed
|
static final Field HEARTBEAT_INTERVAL
static final Field HEARTBEAT_TOPICS_PREFIX
static final Heartbeat NULL
void heartbeat(Consumer<org.apache.kafka.connect.source.SourceRecord> consumer)
consumer - - a code to place record among others to be sent into Connectvoid heartbeat(BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) throws InterruptedException
consumer - - a code to place record among others to be sent into ConnectInterruptedExceptionstatic Heartbeat create(Configuration configuration, String topicName, String key, Supplier<OffsetPosition> positionSupplier)
configuration - - connector configurationtopicName - - topic to which the heartbeat messages will be sentpositionSupplier - - obtain current offset positionCopyright © 2018 JBoss by Red Hat. All rights reserved.