Git Product home page Git Product logo

Comments (5)

cbornet avatar cbornet commented on August 15, 2024

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

from pulsar-client-reactive.

lhotari avatar lhotari commented on August 15, 2024

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.

from pulsar-client-reactive.

lhotari avatar lhotari commented on August 15, 2024

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". It's in different context, but that presentation explains the type of design. Wikipedia's "Result type" contains a short explanation.

from pulsar-client-reactive.

cbornet avatar cbornet commented on August 15, 2024

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.

from pulsar-client-reactive.

lhotari avatar lhotari commented on August 15, 2024

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 pending acknowledgements to "drain" when closing.

from pulsar-client-reactive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.