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)
Provide an instance of Heartbeat object
|
void |
forcedBeat(Map<String,?> partition,
Map<String,?> offset,
BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer)
Generates a heartbeat record unconditionaly
|
void |
heartbeat(Map<String,?> partition,
Map<String,?> offset,
BlockingConsumer<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(Map<String,?> partition, Map<String,?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) throws InterruptedException
partition - partition for the heartbeat recordoffset - offset for the heartbeat recordconsumer - - a code to place record among others to be sent into ConnectInterruptedExceptionvoid forcedBeat(Map<String,?> partition, Map<String,?> offset, BlockingConsumer<org.apache.kafka.connect.source.SourceRecord> consumer) throws InterruptedException
partition - partition for the heartbeat recordoffset - offset for the heartbeat recordconsumer - - a code to place record among others to be sent into ConnectInterruptedExceptionstatic Heartbeat create(Configuration configuration, String topicName, String key)
configuration - - connector configurationtopicName - - topic to which the heartbeat messages will be sentCopyright © 2019 JBoss by Red Hat. All rights reserved.