You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/io/nats/client/FetchConsumeOptions.java
+4-1Lines changed: 4 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,7 @@ public Builder max(int maxBytes, int maxMessages) {
96
96
97
97
/**
98
98
* Set no wait to true
99
+
* When no wait is true, the fetch will return immediately with as many messages as are available. Between zero and the maximum configured.
99
100
* @return the builder
100
101
*/
101
102
@Override
@@ -106,7 +107,9 @@ public Builder noWait() {
106
107
}
107
108
108
109
/**
109
-
* Set no wait to true with an expiration, special behavior.
110
+
* Set no wait to true with an expiration. This is the common configuration to receive messages as soon as they arrive in the stream without excessive pulling.
111
+
* When no wait is true with expire, the fetch will return immediately with as many messages as are available, but at least one message. Between one and the maximum configured.
112
+
* When no message is available it will wait for new messages to arrive till it expires.
110
113
* @param expiresInMillis the expiration time in milliseconds
0 commit comments