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


##########
pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ReactiveMessageConsumer.java:
##########
@@ -24,10 +24,33 @@
 import reactor.core.publisher.Flux;
 import reactor.core.publisher.Mono;
 
+/**
+ * Reactive message consumer interface.
+ *
+ * @param <T> the message payload type.
+ * @author Lari Hotari
+ * @author Christophe Bornet
+ */
 public interface ReactiveMessageConsumer<T> {
 
+       /**
+        * Consumes one message.
+        * @param messageHandler a {@link Function} to apply to the consumed 
message that
+        * returns a {@link MessageResult}
+        * @return the value contained by the {@link MessageResult} returned by 
the message
+        * handler
+        * @param <R> the type of MessageResult returned by the message handler
+        */
        <R> Mono<R> consumeOne(Function<Message<T>, 
Publisher<MessageResult<R>>> messageHandler);
 
+       /**
+        * Consumes messages continuously.
+        * @param messageHandler a {@link Function} to apply to the consumed 
messages that
+        * returns {@link MessageResult}s
+        * @return the values contained by the {@link MessageResult}s returned 
by the message
+        * handler
+        * @param <R> the type of MessageResult returned by the message handler
+        */

Review Comment:
   It's necessary to explain how acknowledgements work. 
   
   For example:
   The message handler returns a MessageResult which contains the 
acknowledgement or negative acknowledgement referencing the message id of the 
input message together with an optional return value object from the message 
handler.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to