Skip to content

Add lookup throttling in cpp-client #225

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 21, 2017

Conversation

rdhabalia
Copy link
Contributor

Motivation

Sometimes, It is useful to throttle at client in order to avoid large number of concurrent lookup-requests going to broker while creating producers/consumers.

Modifications

Add client side lookup throttling while creating producer and consumer.

Result

Client can have capability to restrict number of concurrent lookup request to broker in order to throttle while creating producer/consumer.

@rdhabalia rdhabalia added the type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages label Feb 18, 2017
@rdhabalia rdhabalia added this to the 1.17 milestone Feb 18, 2017
@rdhabalia rdhabalia self-assigned this Feb 18, 2017
@rdhabalia rdhabalia changed the title Add lookup throttling Add lookup throttling in cpp-client Feb 18, 2017
Copy link
Contributor

@merlimat merlimat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -267,6 +267,9 @@ class ClientConnection : public boost::enable_shared_from_this<ClientConnection>
bool havePendingPingRequest_;
DeadlineTimerPtr keepAliveTimer_;

unsigned long maxPendingLookupRequest_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use type with the size info, e.g.: either uint32_t or uint64_t. In this case 32 bits should be enough

@rdhabalia rdhabalia requested a review from saandrews February 21, 2017 19:37
@saandrews
Copy link
Contributor

👍

@rdhabalia rdhabalia merged commit 4ac21b4 into apache:master Feb 21, 2017
@rdhabalia rdhabalia deleted the cpp_throttling branch June 21, 2017 18:55
sijie pushed a commit to sijie/pulsar that referenced this pull request Mar 4, 2018
* adding checks for parallelism

* fixing unit test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The enhancements for the existing features or docs. e.g. reduce memory usage of the delayed messages
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants