pulsar-client-cpp icon indicating copy to clipboard operation
pulsar-client-cpp copied to clipboard

[feature request] C++ and Python client support consumer memory limits.

Open shibd opened this issue 3 years ago • 1 comments

Search before asking

  • [X] I searched in the issues and found nothing similar.

Motivation

PIP-74

C++ client consumers have not implemented memory limits yet.

Solution

There are several key points to achieving this feature.

  1. Reconstructing the consumer structure.
    • https://github.com/apache/pulsar/pull/16969
    • Abstract ConsumerBase, put together some common logic.
  2. Refactoring single-consumer and MultiTopicConsumer transports type.
    • In the current implementation of C++, messages are sent to multi-topic consumers by blocking queue + listener, which is an old historical implementation. If you want to achieve memory limits, you need to do the same as the current java implementation, let MuiltiTopicConsumer take the initiative to control the message.

Alternatives

Here's an imperfect draft: https://github.com/apache/pulsar/pull/16933

Anything else?

No response

Are you willing to submit a PR?

  • [x] I'm willing to submit a PR!

shibd avatar Aug 19 '22 03:08 shibd

The issue had no activity for 30 days, mark with Stale label.

github-actions[bot] avatar Sep 19 '22 02:09 github-actions[bot]