Skip to content

[Enhancement] PIP-234: Add a solution to share the memory limit controller solution #25212

@lhotari

Description

@lhotari

Search before reporting

  • I searched in the issues and found nothing similar.

Motivation

PIP-234 enables sharing of Pulsar client resources across multiple isolated Pulsar client instances. This was implemented in #24784 and #24790.
The solution lacks limiting the total amount of memory across all of the Pulsar client instances. That would be useful when memory limiting relies on the memory limit controller.

Solution

Modify org.apache.pulsar.client.api.PulsarClientSharedResources interface and implementation to support sharing memory limit controller in the same way as other shared resources are configured without directly referencing implementation instances.
Modify the current MemoryLimitController to support sharing. It would require support for registering multiple trigger callbacks and deregistering the callback when the client instance gets closed.

Alternatives

No response

Anything else?

No response

Are you willing to submit a PR?

  • I'm willing to submit a PR!

Metadata

Metadata

Assignees

Labels

type/enhancementThe enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions