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/09/12 05:21:56 UTC

[GitHub] [pulsar-client-reactive] lhotari opened a new issue, #8: Document message acknowledgement in ReactiveMessageConsumer

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

   The Reactive Java client takes a different approach for message acknowledgements. 
   The acknowledgement is modeled as a value instead of a "side-effect". 
   This needs to be documented and explained.


-- 
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.apache.org

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


[GitHub] [pulsar-client-reactive] cbornet commented on issue #8: Document message acknowledgement in ReactiveMessageConsumer

Posted by GitBox <gi...@apache.org>.
cbornet commented on issue #8:
URL: https://github.com/apache/pulsar-client-reactive/issues/8#issuecomment-1293925006

   Beware that batched messages may not be acked if all the messages from the batch are not acked before closing the consumer (the consumer is closed when consumeOne/consumeMany completes).


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


[GitHub] [pulsar-client-reactive] cbornet commented on issue #8: Document message acknowledgement in ReactiveMessageConsumer

Posted by GitBox <gi...@apache.org>.
cbornet commented on issue #8:
URL: https://github.com/apache/pulsar-client-reactive/issues/8#issuecomment-1311473140

   > This is most likely caused by the lack of configuring .batchIndexAckEnabled(true) on the ReactiveMessageConsumerBuilder and enabling acknowledgmentAtBatchIndexLevelEnabled=true in broker.conf
   
   I think that if the consumer gets closed the batch will be fully redelivered to another consumer. So it's not really enough for the consumeOne case.


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


[GitHub] [pulsar-client-reactive] lhotari commented on issue #8: Document message acknowledgement in ReactiveMessageConsumer

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #8:
URL: https://github.com/apache/pulsar-client-reactive/issues/8#issuecomment-1311308800

   > Beware that batched messages may not be acked if all the messages from the batch are not acked before closing the consumer (the consumer is closed when consumeOne/consumeMany completes).
   
   This is most likely caused by the lack of configuring `.batchIndexAckEnabled(true)` on the ReactiveMessageConsumerBuilder and enabling  `acknowledgmentAtBatchIndexLevelEnabled=true` in broker.conf (`PULSAR_PREFIX_acknowledgmentAtBatchIndexLevelEnabled=true` env variable for docker container, #13 contains changes for Pulsar Testcontainer). If it doesn't fix the issue, we'd have to investigate further.


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


[GitHub] [pulsar-client-reactive] lhotari commented on issue #8: Document message acknowledgement in ReactiveMessageConsumer

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #8:
URL: https://github.com/apache/pulsar-client-reactive/issues/8#issuecomment-1311665704

   > > This is most likely caused by the lack of configuring .batchIndexAckEnabled(true) on the ReactiveMessageConsumerBuilder and enabling acknowledgmentAtBatchIndexLevelEnabled=true in broker.conf
   > 
   > I think that if the consumer gets closed the batch will be fully redelivered to another consumer. So it's not really enough for the consumeOne case.
   
   `.batchIndexAckEnabled(true)` and `acknowledgmentAtBatchIndexLevelEnabled=true` should handle that. I guess the gap is with the asynchronous acknowledgement mode which might not wait for all acknowledgements to "drain" when closing. 


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


[GitHub] [pulsar-client-reactive] lhotari commented on issue #8: Document message acknowledgement in ReactiveMessageConsumer

Posted by GitBox <gi...@apache.org>.
lhotari commented on issue #8:
URL: https://github.com/apache/pulsar-client-reactive/issues/8#issuecomment-1311309493

   The purpose of MessageResult is to have a functional and data (value) oriented way to do acknowledgments without side-effects. In functional programming, everything is a value. By googling, I found a related presentation ["Railway Oriented Programming: Functional error handling"](https://cdn.statically.io/gh/swlaschin/TechTrain2021/main/Rop.pdf). It's in different context, but that presentation explains the type of design. Wikipedia's ["Result type"](https://en.wikipedia.org/wiki/Result_type) contains a short explanation.


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