|
@@ -352,6 +352,11 @@ type Config struct {
|
|
|
|
|
|
|
|
|
Offsets struct {
|
|
|
+
|
|
|
+
|
|
|
+ CommitInterval time.Duration
|
|
|
+
|
|
|
+
|
|
|
AutoCommit struct {
|
|
|
|
|
|
|
|
@@ -688,6 +693,11 @@ func (c *Config) Validate() error {
|
|
|
return ConfigurationError("Consumer.IsolationLevel must be ReadUncommitted or ReadCommitted")
|
|
|
}
|
|
|
|
|
|
+ if c.Consumer.Offsets.CommitInterval != 0 {
|
|
|
+ Logger.Println("Deprecation warning: Consumer.Offsets.CommitInterval exists for historical compatibility" +
|
|
|
+ " and should not be used. Please use Consumer.Offsets.AutoCommit, the current value will be ignored")
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
if c.Consumer.IsolationLevel == ReadCommitted && !c.Version.IsAtLeast(V0_11_0_0) {
|
|
|
return ConfigurationError("ReadCommitted requires Version >= V0_11_0_0")
|