public class KafkaStoreReaderThread<K,V> extends ShutdownableThread
On startup, this thread will always read from the beginning of the topic. We assume the topic will always be small, hence the startup time to read the topic won't take too long. Because the topic is always read from the beginning, the consumer never commits offsets.
Thread.State, Thread.UncaughtExceptionHandlerlogPrefixMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
KafkaStoreReaderThread(String bootstrapBrokers,
String topic,
String groupId,
StoreUpdateHandler<K,V> storeUpdateHandler,
Serializer<K,V> serializer,
Store<K,V> localStore,
org.apache.kafka.clients.producer.Producer<byte[],byte[]> producer,
K noopKey,
AtomicBoolean initialized,
SchemaRegistryConfig config) |
| Modifier and Type | Method and Description |
|---|---|
Map<org.apache.kafka.common.TopicPartition,Long> |
checkpoints() |
void |
doWork()
This method is repeatedly invoked until the thread shuts down or this method throws an
exception
|
String |
getConsumerProperty(String key) |
void |
shutdown() |
void |
waitUntilOffset(long offset,
long timeout,
TimeUnit timeUnit) |
awaitShutdown, initiateShutdown, isRunning, isShutdownComplete, isShutdownInitiated, isThreadFailed, pause, runactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldpublic KafkaStoreReaderThread(String bootstrapBrokers, String topic, String groupId, StoreUpdateHandler<K,V> storeUpdateHandler, Serializer<K,V> serializer, Store<K,V> localStore, org.apache.kafka.clients.producer.Producer<byte[],byte[]> producer, K noopKey, AtomicBoolean initialized, SchemaRegistryConfig config)
public void doWork()
ShutdownableThreaddoWork in class ShutdownableThreadpublic void shutdown()
shutdown in class ShutdownableThreadpublic void waitUntilOffset(long offset,
long timeout,
TimeUnit timeUnit)
throws StoreException
StoreExceptionCopyright © 2026 Confluent, Inc.. All rights reserved.