public class TracingKafkaReceiver<K,V> extends Object implements reactor.kafka.receiver.KafkaReceiver<K,V>
KafkaReceiver that delegates most of the work back to original
consumer, but returns publishers decorated with tracing context per each element.ReactiveKafkaTracingPropagator| Constructor and Description |
|---|
TracingKafkaReceiver(ReactiveKafkaTracingPropagator reactiveKafkaTracingPropagator,
reactor.kafka.receiver.KafkaReceiver<K,V> delegate) |
| Modifier and Type | Method and Description |
|---|---|
static <K,V> reactor.kafka.receiver.KafkaReceiver<K,V> |
create(ReactiveKafkaTracingPropagator reactiveKafkaTracingPropagator,
reactor.kafka.receiver.internals.ConsumerFactory factory,
reactor.kafka.receiver.ReceiverOptions<K,V> options)
Creates KafkaReceiver that will de decorated by tracing propagator to provide kafka
consumer publishing elements containing tracing context in their reactor context.
|
static <K,V> reactor.kafka.receiver.KafkaReceiver<K,V> |
create(ReactiveKafkaTracingPropagator reactiveKafkaTracingPropagator,
reactor.kafka.receiver.ReceiverOptions<K,V> options)
Creates KafkaReceiver that will de decorated by tracing propagator to provide kafka
consumer publishing elements containing tracing context in their reactor context.
|
<T> reactor.core.publisher.Mono<T> |
doOnConsumer(Function<org.apache.kafka.clients.consumer.Consumer<K,V>,? extends T> function) |
reactor.core.publisher.Flux<reactor.kafka.receiver.ReceiverRecord<K,V>> |
receive() |
reactor.core.publisher.Flux<reactor.kafka.receiver.ReceiverRecord<K,V>> |
receive(Integer prefetch) |
reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> |
receiveAtmostOnce() |
reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> |
receiveAtmostOnce(Integer prefetch) |
reactor.core.publisher.Flux<reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>> |
receiveAutoAck() |
reactor.core.publisher.Flux<reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>> |
receiveAutoAck(Integer prefetch) |
reactor.core.publisher.Flux<reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>> |
receiveExactlyOnce(reactor.kafka.sender.TransactionManager transactionManager,
Integer prefetch) |
public TracingKafkaReceiver(ReactiveKafkaTracingPropagator reactiveKafkaTracingPropagator, reactor.kafka.receiver.KafkaReceiver<K,V> delegate)
public static <K,V> reactor.kafka.receiver.KafkaReceiver<K,V> create(ReactiveKafkaTracingPropagator reactiveKafkaTracingPropagator, reactor.kafka.receiver.ReceiverOptions<K,V> options)
K - Key of the recordV - Value of the recordreactiveKafkaTracingPropagator - Instance of trace propagation decorator.
Should be available in spring application context as a bean.options - Options to pass for underlying
KafkaReceiver.create(ReceiverOptions)public static <K,V> reactor.kafka.receiver.KafkaReceiver<K,V> create(ReactiveKafkaTracingPropagator reactiveKafkaTracingPropagator, reactor.kafka.receiver.internals.ConsumerFactory factory, reactor.kafka.receiver.ReceiverOptions<K,V> options)
K - Key of the recordV - Value of the recordreactiveKafkaTracingPropagator - Instance of trace propagation decorator.
Should be available in spring application context as a bean.factory - Custom factory to provide for underlying
KafkaReceiver.create(ConsumerFactory, ReceiverOptions)options - Options to provide for underlying
KafkaReceiver.create(ConsumerFactory, ReceiverOptions)public reactor.core.publisher.Flux<reactor.kafka.receiver.ReceiverRecord<K,V>> receive(Integer prefetch)
public reactor.core.publisher.Flux<reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>> receiveAutoAck(Integer prefetch)
public reactor.core.publisher.Flux<reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>> receiveAutoAck()
public reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> receiveAtmostOnce(Integer prefetch)
public reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>> receiveAtmostOnce()
public reactor.core.publisher.Flux<reactor.core.publisher.Flux<org.apache.kafka.clients.consumer.ConsumerRecord<K,V>>> receiveExactlyOnce(reactor.kafka.sender.TransactionManager transactionManager, Integer prefetch)
Copyright © 2023 Pivotal Software, Inc.. All rights reserved.