Skip to content
New issue

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

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

Already on GitHub? # to your account

[fix][doc] Refine ClientBuilder#memoryLimit and ConsumerBuilder#autoScaledReceiverQueueSizeEnabled javadoc #23687

Merged
merged 1 commit into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,8 @@ ClientBuilder authentication(String authPluginClassName, Map<String, String> aut
ClientBuilder tlsProtocols(Set<String> tlsProtocols);

/**
* Configure a limit on the amount of direct memory that will be allocated by this client instance.
* <p>
* <b>Note: at this moment this is only limiting the memory for producers.</b>
* Configure a limit on the amount of direct memory that will be allocated by this client instance
* <i>(default: 64 MB)</i>.
* <p>
* Setting this to 0 will disable the limit.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -884,13 +884,16 @@ public interface ConsumerBuilder<T> extends Cloneable {

/**
* If this is enabled, the consumer receiver queue size is initialized as a very small value, 1 by default,
* and will double itself until it reaches the value set by {@link #receiverQueueSize(int)}, if and only if:
* and will double itself until it reaches either the value set by {@link #receiverQueueSize(int)} or the client
* memory limit set by {@link ClientBuilder#memoryLimit(long, SizeUnit)}.
*
* <p>The consumer receiver queue size will double if and only if:
* <p>1) User calls receive() and there are no messages in receiver queue.
* <p>2) The last message we put in the receiver queue took the last space available in receiver queue.
*
* This is disabled by default and currentReceiverQueueSize is initialized as maxReceiverQueueSize.
* <p>This is disabled by default and currentReceiverQueueSize is initialized as maxReceiverQueueSize.
*
* The feature should be able to reduce client memory usage.
* <p>The feature should be able to reduce client memory usage.
*
* @param enabled whether to enable AutoScaledReceiverQueueSize.
*/
Expand Down
Loading