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

[fix][client] Fix the javadoc for ConsumerBuilder.isAckReceiptEnabled #23452

Merged
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 @@ -198,17 +198,21 @@ public interface ConsumerBuilder<T> extends Cloneable {
ConsumerBuilder<T> ackTimeout(long ackTimeout, TimeUnit timeUnit);

/**
* Acknowledgement returns receipt, but the message is not re-sent after getting receipt.
* Enables or disables the acknowledgment receipt feature.
lhotari marked this conversation as resolved.
Show resolved Hide resolved
*
* Configure the acknowledgement timeout mechanism to redeliver the message if it is not acknowledged after
* ackTimeout, or to execute a timer task to check the acknowledgement timeout messages during every
* ackTimeoutTickTime period.
* <p>When this feature is enabled, the consumer ensures that acknowledgments are processed by the broker by
* waiting for a receipt from the broker. Even when the broker returns a receipt, it doesn't guarantee that the
* message won't be redelivered later due to certain implementation details.
* It is recommended to use the asynchronous {@link Consumer#acknowledgeAsync(Message)} method for acknowledgment
* when this feature is enabled. This is because using the synchronous {@link Consumer#acknowledge(Message)} method
* with acknowledgment receipt can cause performance issues due to the round trip to the server, which prevents
* pipelining (having multiple messages in-flight). With the asynchronous method, the consumer can continue
* consuming other messages while waiting for the acknowledgment receipts.
*
* @param isAckReceiptEnabled {@link Boolean} enables acknowledgement for receipt
* @param isAckReceiptEnabled {@code true} to enable acknowledgment receipt, {@code false} to disable it
* @return the consumer builder instance
*/
ConsumerBuilder<T> isAckReceiptEnabled(boolean isAckReceiptEnabled);

/**
* Define the granularity of the ack-timeout redelivery.
*
Expand Down
Loading