java.lang.Object
io.helidon.messaging.connectors.kafka.KafkaSubscriber<K,V>
Type Parameters:
K - kafka record key type
V - kafka record value type
All Implemented Interfaces:
Subscriber<Message<V>>

public class KafkaSubscriber<K,V> extends Object implements Subscriber<Message<V>>
Reactive streams subscriber implementation.
  • Method Details

    • onSubscribe

      public void onSubscribe(Subscription subscription)
      Specified by:
      onSubscribe in interface Subscriber<K>
    • onNext

      public void onNext(Message<V> message)
      Specified by:
      onNext in interface Subscriber<K>
    • onError

      public void onError(Throwable t)
      Specified by:
      onError in interface Subscriber<K>
    • onComplete

      public void onComplete()
      Specified by:
      onComplete in interface Subscriber<K>
    • builder

      public static <K, V> KafkaSubscriber.Builder<K,V> builder()
      A builder for KafkaSubscriber.
      Type Parameters:
      K - Key type
      V - Value type
      Returns:
      builder to create a new instance
    • create

      public static <K, V> KafkaSubscriber<K,V> create(Config config)
      Load this builder from a configuration.
      Type Parameters:
      K - Key type
      V - Value type
      Parameters:
      config - configuration to load from
      Returns:
      updated builder instance