File tree 1 file changed +9
-0
lines changed
1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change 37
37
RequiredAcks int
38
38
// MaxRetry Tag
39
39
MaxRetry int
40
+ // Max Message Bytes
41
+ MaxMessageBytes int
40
42
41
43
Version string `toml:"version"`
42
44
@@ -140,6 +142,9 @@ var sampleConfig = `
140
142
## until the next flush.
141
143
# max_retry = 3
142
144
145
+ ## Max message bytes, should be lower than server message.max.bytes config
146
+ # MaxMessageBytes = 0
147
+
143
148
## Optional TLS Config
144
149
# tls_ca = "/etc/telegraf/ca.pem"
145
150
# tls_cert = "/etc/telegraf/cert.pem"
@@ -218,6 +223,10 @@ func (k *Kafka) Connect() error {
218
223
config .Producer .Retry .Max = k .MaxRetry
219
224
config .Producer .Return .Successes = true
220
225
226
+ if k .MaxMessageBytes > 0 {
227
+ config .Producer .MaxMessageBytes = k .MaxMessageBytes
228
+ }
229
+
221
230
// Legacy support ssl config
222
231
if k .Certificate != "" {
223
232
k .TLSCert = k .Certificate
You can’t perform that action at this time.
0 commit comments