Modifier and Type | Class and Description |
---|---|
static class |
AsyncFetcher.Builder<K,V>
Builder for the AsyncFetcher.
|
Modifier and Type | Method and Description |
---|---|
static <K,V> AsyncFetcher.Builder<K,V> |
builder(ConsumerFactory<K,V> consumerFactory)
Initialize a builder for configuring an AsyncFetcher, using given
consumerFactory for creating Kafka
Consumers. |
static <K,V> AsyncFetcher.Builder<K,V> |
builder(Map<String,Object> consumerConfig)
Initialize a builder for configuring an AsyncFetcher, using given Kafka
consumerConfig . |
void |
shutdown()
Shuts the fetcher down, closing any resources used by this fetcher.
|
MessageStream<TrackedEventMessage<?>> |
start(KafkaTrackingToken token)
Open a stream of messages, starting at the position indicated by the given
token . |
public static <K,V> AsyncFetcher.Builder<K,V> builder(Map<String,Object> consumerConfig)
consumerConfig
.
Note that configuring a MessageConverter on the builder is mandatory if the value type is not byte[]
.
K
- key type.V
- value type.consumerConfig
- The configuration of KafkaConsumers to use when creating consumerspublic static <K,V> AsyncFetcher.Builder<K,V> builder(ConsumerFactory<K,V> consumerFactory)
consumerFactory
for creating Kafka
Consumers.
Note that configuring a MessageConverter on the builder is mandatory if the value type is not byte[]
.
K
- key type.V
- value type.consumerFactory
- The factory providing Kafka Consumer instancespublic MessageStream<TrackedEventMessage<?>> start(KafkaTrackingToken token)
Fetcher
token
.Copyright © 2010–2018. All rights reserved.