Class KafkaRecordStreamSubscription<K,V,T>
- java.lang.Object
-
- io.smallrye.reactive.messaging.kafka.impl.KafkaRecordStreamSubscription<K,V,T>
-
- Type Parameters:
K
- type of incoming record keyV
- type of incoming record payloadT
- type of the items to emit downstream
- All Implemented Interfaces:
org.reactivestreams.Subscription
public class KafkaRecordStreamSubscription<K,V,T> extends Object implements org.reactivestreams.Subscription
ASubscription
which, onrequest(long)
, pollsConsumerRecords
from the given consumer client and emits records downstream.It uses an internal queue to store records received but not yet emitted downstream. The given enqueue function can flatten the polled
ConsumerRecords
into individual records or enqueue it as-is.
-
-
Constructor Summary
Constructors Constructor Description KafkaRecordStreamSubscription(ReactiveKafkaConsumer<K,V> client, KafkaConnectorIncomingConfiguration config, io.smallrye.mutiny.subscription.MultiSubscriber<? super T> subscriber, io.vertx.core.Context context, int maxPollRecords, BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>,RecordQueue<T>> enqueueFunction)
-
-
-
Constructor Detail
-
KafkaRecordStreamSubscription
public KafkaRecordStreamSubscription(ReactiveKafkaConsumer<K,V> client, KafkaConnectorIncomingConfiguration config, io.smallrye.mutiny.subscription.MultiSubscriber<? super T> subscriber, io.vertx.core.Context context, int maxPollRecords, BiConsumer<org.apache.kafka.clients.consumer.ConsumerRecords<K,V>,RecordQueue<T>> enqueueFunction)
-
-