You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/11/28 09:28:02 UTC

[GitHub] [pulsar-client-reactive] lhotari commented on a diff in pull request #29: Add javadoc to ReactiveMessageReader

lhotari commented on code in PR #29:
URL: https://github.com/apache/pulsar-client-reactive/pull/29#discussion_r1033304281


##########
pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ReactiveMessageReader.java:
##########
@@ -20,10 +20,25 @@
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
+/**
+ * Reactive message reader interface.
+ *
+ * @param <T> the message payload type.
+ * @author Lari Hotari
+ * @author Christophe Bornet
+ */
 public interface ReactiveMessageReader<T> {
 
+	/**
+	 * Read one message.
+	 * @return the message read
+	 */
 	Mono<Message<T>> readOne();
 
+	/**
+	 * Read messages continuously.
+	 * @return the messages read
+	 */
 	Flux<Message<T>> readMany();

Review Comment:
   It would be useful to refer to ReactiveMessageReaderBuilder#endOfStreamAction in the documentation for these methods. When endOfStreamAction == EndOfStreamAction#COMPLETE, readOne will return an empty Mono if the reader reaches the end of the stream of messages.   
   I'll add a separate issue to document endOfStreamAction.
   



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org