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


##########
pulsar-client-reactive-api/src/main/java/org/apache/pulsar/reactive/client/api/ReactiveMessageSender.java:
##########
@@ -17,13 +17,41 @@
 package org.apache.pulsar.reactive.client.api;
 
 import org.apache.pulsar.client.api.MessageId;
-import reactor.core.publisher.Flux;
-import reactor.core.publisher.Mono;
+import org.reactivestreams.Publisher;
 
 public interface ReactiveMessageSender<T> {
 
-       Mono<MessageId> sendMessage(Mono<MessageSpec<T>> messageSpec);
+       /**
+        * Send one message.
+        * @param messageSpec the spec of the message to send
+        * @return a publisher that will emit one message id and complete
+        */
+       Publisher<MessageId> send(MessageSpec<T> messageSpec);
 
-       Flux<MessageId> sendMessages(Flux<MessageSpec<T>> messageSpecs);
+       /**
+        * Send multiple messages and get the associated message ids in the 
same order as the
+        * sent messages.
+        * @param messageSpecs the specs of the messages to send
+        * @return a publisher that will emit a message id per message 
successfully sent in
+        * the order that they have been sent
+        */
+       Publisher<MessageId> sendAll(Publisher<MessageSpec<T>> messageSpecs);
+
+       /**
+        * Convert to a reactor based message sender.
+        * @return the reactor based message sender instance
+        */
+       default ReactorMessageSender<T> toReactor() {
+               return new ReactorMessageSender<>(this);
+       }
+
+       /**
+        * Convert to a RxJava 3 based message sender. Use only if you have 
RxJava 3 on the
+        * class path (not pulled by pulsar-client-reactive-api).
+        * @return the RxJava 3 based message sender instance.
+        */
+       default RxJavaMessageSender<T> toRxJava() {
+               return new RxJavaMessageSender<>(this);
+       }

Review Comment:
   I replied in 
https://github.com/apache/pulsar-client-reactive/pull/11#pullrequestreview-1155947293



-- 
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