Skip to content
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

Add client-side lookup throttling #182

Merged
merged 1 commit into from
Feb 7, 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 Jan 31, 2017
@rdhabalia rdhabalia added this to the 1.17 milestone Jan 31, 2017
@rdhabalia rdhabalia self-assigned this Jan 31, 2017
}

/**
* Configure total allowed concurrent lookup-request to prevent overload on broker.
Copy link
Contributor

Choose a reason for hiding this comment

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

We should note here in the javadoc that the default is 5000 and that one should not worry to change this unless you plan to produce/subscribe on 1000s of topics from the same client instance.

}
});
} else {
log.warn("{} Failed to add lookup-request into pending queue", requestId);
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd rather keep this at debug level, since it is part of the normal operations flow

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.

👍

(Let's wait to tag 1.16 release before merging this one)

@merlimat merlimat merged commit 295577c into apache:master Feb 7, 2017
@rdhabalia rdhabalia deleted the client_throttling branch June 21, 2017 18:55
sijie pushed a commit to sijie/pulsar that referenced this pull request Mar 4, 2018
hrsakai pushed a commit to hrsakai/pulsar that referenced this pull request Dec 10, 2020
Signed-off-by: xiaolong.ran <[email protected]>

Fix nil pointer dereference of PartitionMetadataResponse
hangc0276 pushed a commit to hangc0276/pulsar that referenced this pull request May 26, 2021
fix apache#181
This pull request fix the deadlock in kop.
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.

2 participants