You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by cb...@apache.org on 2022/10/27 18:40:03 UTC
[pulsar-client-reactive] branch main updated: Rename methods in README (#16)
This is an automated email from the ASF dual-hosted git repository.
cbornet pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pulsar-client-reactive.git
The following commit(s) were added to refs/heads/main by this push:
new df52dfa Rename methods in README (#16)
df52dfa is described below
commit df52dfa541fe8ead1a133c67f5d04ab0f16f8c4e
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Thu Oct 27 21:39:58 2022 +0300
Rename methods in README (#16)
---
README.adoc | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/README.adoc b/README.adoc
index a4760c2..2b884f2 100644
--- a/README.adoc
+++ b/README.adoc
@@ -74,7 +74,7 @@ ReactiveMessageSender<String> messageSender = reactivePulsarClient
.maxInflight(100)
.build();
Mono<MessageId> messageId = messageSender
- .send(MessageSpec.of("Hello world!"));
+ .sendOne(MessageSpec.of("Hello world!"));
// for demonstration
messageId.subscribe(System.out::println);
----
@@ -122,7 +122,7 @@ ReactiveMessageSender<String> messageSender = reactivePulsarClient
.maxInflight(100)
.build();
Mono<MessageId> messageId = messageSender
- .send(MessageSpec.of("Hello world!"));
+ .sendOne(MessageSpec.of("Hello world!"));
// for demonstration
messageId.subscribe(System.out::println);
----
@@ -142,7 +142,7 @@ Reading all messages for a topic:
reactivePulsarClient.messageReader(Schema.STRING)
.topic(topicName)
.build();
- messageReader.readMessages()
+ messageReader.readMany()
.map(Message::getValue)
// for demonstration
.subscribe(System.out::println);
@@ -162,7 +162,7 @@ With `.endOfStreamAction(EndOfStreamAction.POLL)` the Reader will poll for new m
.startAtSpec(StartAtSpec.LATEST)
.endOfStreamAction(EndOfStreamAction.POLL)
.build();
- messageReader.readMessages()
+ messageReader.readMany()
.take(Duration.ofSeconds(5))
.take(5)
// for demonstration
@@ -178,7 +178,7 @@ With `.endOfStreamAction(EndOfStreamAction.POLL)` the Reader will poll for new m
.topic(topicName)
.subscriptionName("sub")
.build();
- messageConsumer.consumeMessages(messageFlux ->
+ messageConsumer.consumeMany(messageFlux ->
messageFlux.map(message ->
MessageResult.acknowledge(message.getMessageId(), message.getValue())))
.take(Duration.ofSeconds(2))