Class KafkaSubscriber<K,V>
- java.lang.Object
-
- io.helidon.messaging.connectors.kafka.KafkaSubscriber<K,V>
-
- Type Parameters:
K
- kafka record key typeV
- 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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
KafkaSubscriber.Builder<K,V>
Fluent API builder forKafkaSubscriber
.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <K,V>
KafkaSubscriber.Builder<K,V>builder()
A builder for KafkaSubscriber.static <K,V>
KafkaSubscriber<K,V>create(Config config)
Load this builder from a configuration.void
onComplete()
void
onError(Throwable t)
void
onNext(Message<V> message)
void
onSubscribe(Subscription subscription)
-
-
-
Method Detail
-
onSubscribe
public void onSubscribe(Subscription subscription)
- Specified by:
onSubscribe
in interfaceSubscriber<K>
-
onNext
public void onNext(Message<V> message)
- Specified by:
onNext
in interfaceSubscriber<K>
-
onError
public void onError(Throwable t)
- Specified by:
onError
in interfaceSubscriber<K>
-
onComplete
public void onComplete()
- Specified by:
onComplete
in interfaceSubscriber<K>
-
builder
public static <K,V> KafkaSubscriber.Builder<K,V> builder()
A builder for KafkaSubscriber.- Type Parameters:
K
- Key typeV
- 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 typeV
- Value type- Parameters:
config
- configuration to load from- Returns:
- updated builder instance
-
-