Class KafkaRecordStreamSubscription<K,​V,​T>

  • Type Parameters:
    K - type of incoming record key
    V - type of incoming record payload
    T - 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
    A Subscription which, on request(long), polls ConsumerRecords 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.

    • Method Detail

      • request

        public void request​(long n)
        Specified by:
        request in interface org.reactivestreams.Subscription
      • cancel

        public void cancel()
        Specified by:
        cancel in interface org.reactivestreams.Subscription