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"
@@ -219,6 +224,10 @@ func (k *Kafka) Connect() error {
219
224
config .Producer .Retry .Max = k .MaxRetry
220
225
config .Producer .Return .Successes = true
221
226
227
+ if k .MaxMessageBytes > 0 {
228
+ config .Producer .MaxMessageBytes = k .MaxMessageBytes
229
+ }
230
+
222
231
// Legacy support ssl config
223
232
if k .Certificate != "" {
224
233
k .TLSCert = k .Certificate
You can’t perform that action at this time.
0 commit comments