See: Description
Package | Description |
---|---|
reactor.kafka.receiver |
Reactor Kafka Receiver API
|
reactor.kafka.receiver.observation |
Provides classes to support of Micrometer Observation API for Reactor Kafka Receiver.
|
reactor.kafka.sender |
Reactor Kafka Sender API
|
reactor.kafka.sender.observation |
Provides classes to support of Micrometer Observation API for Reactor Kafka Sender.
|
Reactor Kafka is a reactive API for Apache Kafka based on Project Reactor. Reactor Kafka API enables messages to be published to Kafka topics and consumed from Kafka topics using functional APIs with non-blocking back-pressure and very low overheads. This enables applications using Reactor to use Kafka as a message bus or streaming platform and integrate with other systems to provide an end-to-end reactive pipeline.
sender.send(Flux.range(1, 10).map(i -> SenderRecord.create(new ProducerRecord<>(topic, i, "Message_" + i)), i)) .doOnNext(r -> log.debug("Message #{} result: {}", r.correlationMetadata(), r.recordMetadata())) .subscribe();
receiver.receive() .subscribe(r -> { log.info("Received message {} ", r); r.receiverOffset().acknowledge(); });
More detailed documentation is available in the Reference Guide.