tripletk opened a new issue, #220:
URL: https://github.com/apache/pulsar-client-reactive/issues/220

   Is there support to acknowledge outside of the 
[consumeOne](https://github.com/apache/pulsar-client-reactive/blob/6170ebe7f3b6d7ee75071d9b6fb3d6a750a622e7/pulsar-client-reactive-adapter/src/main/java/org/apache/pulsar/reactive/client/internal/adapter/AdaptedReactiveMessageConsumer.java#L63)
 and 
[consumeMany](https://github.com/apache/pulsar-client-reactive/blob/6170ebe7f3b6d7ee75071d9b6fb3d6a750a622e7/pulsar-client-reactive-adapter/src/main/java/org/apache/pulsar/reactive/client/internal/adapter/AdaptedReactiveMessageConsumer.java#L216)
 of AdaptedReactiveMessageConsumer?
   
   My usecase is I want to consume the messages but don't want the 
acknowledgement to happen within the consumeOne, consumeMany. I want to 
separately acknowledge the pulsar message later on in the reactive pipeline 
after consumeOne, consumeMany. 
   
   e.g.
   ```
   ReactiveMessageConsumer<String> messageConsumer=
                reactivePulsarClient.messageConsumer(Schema.STRING)
                                .topic(topicName)
                                .subscriptionName("sub")
                                .build();
   messageConsumer.consumeMany(messageFlux ->
                        messageFlux.map(message ->
                         doSomeProcessing(message)))
                .flatMap(msgResult -> {
                        MessageId msgId = msgResult.getMessageId();
                        // Acknowledge here outside of consumeMany or consumeOne
                        handleAcknowledgement(msgId);
                })
                // for demonstration
                .subscribe(System.out::println);
   ```


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