未验证 提交 35c38888 编写于 作者: U uglycow 提交者: GitHub

min value for autoCommitIntervalMillis. #1774 (#1775)

* typo fix

* add MessageExt.getBrokerName()

* add brokerName for toString

* get brokerName  from mq

* min value for autoCommitInterval

* use constant variable
上级 d03e46a4
......@@ -94,6 +94,11 @@ public class DefaultLitePullConsumer extends ClientConfig implements LitePullCon
*/
private int pullThreadNums = 20;
/**
* Minimum commit offset interval time in milliseconds.
*/
private static final long MIN_AUTOCOMMIT_INTERVAL_MILLIS = 1000;
/**
* Maximum commit offset interval time in milliseconds.
*/
......@@ -315,8 +320,10 @@ public class DefaultLitePullConsumer extends ClientConfig implements LitePullCon
}
public void setAutoCommitIntervalMillis(long autoCommitIntervalMillis) {
if (autoCommitIntervalMillis >= MIN_AUTOCOMMIT_INTERVAL_MILLIS) {
this.autoCommitIntervalMillis = autoCommitIntervalMillis;
}
}
public int getPullBatchSize() {
return pullBatchSize;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册