Package com.networknt.kafka.consumer
Class KafkaConsumerReadTask<KafkaKeyT,KafkaValueT,ClientKeyT,ClientValueT>
- java.lang.Object
-
- com.networknt.kafka.consumer.KafkaConsumerReadTask<KafkaKeyT,KafkaValueT,ClientKeyT,ClientValueT>
-
public class KafkaConsumerReadTask<KafkaKeyT,KafkaValueT,ClientKeyT,ClientValueT> extends Object
State for tracking the progress of a single consumer read request.To support embedded formats that require translation between the format deserialized by the Kafka decoder and the format returned in the ConsumerRecord entity sent back to the client, this class uses two pairs of key-value generic type parameters: KafkaK/KafkaV is the format returned by the Kafka consumer's decoder/deserializer, ClientK/ClientV is the format returned to the client in the HTTP response. In some cases these may be identical.
-
-
Field Summary
Fields Modifier and Type Field Description static StringUNEXPECTED_CONSUMER_READ_EXCEPTION
-
Constructor Summary
Constructors Constructor Description KafkaConsumerReadTask(KafkaConsumerState<KafkaKeyT,KafkaValueT,ClientKeyT,ClientValueT> parent, Duration timeout, long maxBytes, ConsumerReadCallback<ClientKeyT,ClientValueT> callback, KafkaConsumerConfig config)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddoPartialRead()Performs one iteration of reading from a consumer iterator.booleanisDone()
-
-
-
Field Detail
-
UNEXPECTED_CONSUMER_READ_EXCEPTION
public static final String UNEXPECTED_CONSUMER_READ_EXCEPTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
KafkaConsumerReadTask
public KafkaConsumerReadTask(KafkaConsumerState<KafkaKeyT,KafkaValueT,ClientKeyT,ClientValueT> parent, Duration timeout, long maxBytes, ConsumerReadCallback<ClientKeyT,ClientValueT> callback, KafkaConsumerConfig config)
-
-