Skip to content

Commit

Permalink
Update PollingConfig maxRecords method to return PollingConfig (#1275)
Browse files Browse the repository at this point in the history
  • Loading branch information
etspaceman authored Mar 15, 2024
1 parent ddff314 commit a95aa9e
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -146,12 +146,13 @@ public PollingConfig idleTimeBetweenReadsInMillis(long idleTimeBetweenReadsInMil
return this;
}

public void maxRecords(int maxRecords) {
public PollingConfig maxRecords(int maxRecords) {
if (maxRecords > DEFAULT_MAX_RECORDS) {
throw new IllegalArgumentException(
"maxRecords must be less than or equal to " + DEFAULT_MAX_RECORDS + " but current value is " + maxRecords());
}
this.maxRecords = maxRecords;
return this;
}

/**
Expand Down

0 comments on commit a95aa9e

Please sign in to comment.