File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -16,13 +16,14 @@ package main
16
16
17
17
import (
18
18
"fmt"
19
- dto "github.com/prometheus/client_model/go"
20
- "github.com/prometheus/common/expfmt"
21
- "gopkg.in/yaml.v2"
22
19
"os"
23
20
"strings"
24
21
"text/template"
25
22
23
+ dto "github.com/prometheus/client_model/go"
24
+ "github.com/prometheus/common/expfmt"
25
+ "gopkg.in/yaml.v2"
26
+
26
27
"github.com/sirupsen/logrus"
27
28
)
28
29
45
46
kafkaSaslUsername = ""
46
47
kafkaSaslPassword = ""
47
48
serializer Serializer
49
+ kafkaAcks = "all"
48
50
)
49
51
50
52
func init () {
@@ -111,6 +113,9 @@ func init() {
111
113
if value := os .Getenv ("KAFKA_SASL_PASSWORD" ); value != "" {
112
114
kafkaSaslPassword = value
113
115
}
116
+ if value := os .Getenv ("KAFKA_ACKS" ); value != "" {
117
+ kafkaAcks = value
118
+ }
114
119
115
120
if value := os .Getenv ("MATCH" ); value != "" {
116
121
matchList , err := parseMatchList (value )
Original file line number Diff line number Diff line change @@ -33,6 +33,7 @@ func main() {
33
33
"batch.num.messages" : kafkaBatchNumMessages ,
34
34
"go.batch.producer" : true , // Enable batch producer (for increased performance).
35
35
"go.delivery.reports" : false , // per-message delivery reports to the Events() channel
36
+ "acks" : kafkaAcks ,
36
37
}
37
38
38
39
if kafkaSslClientCertFile != "" && kafkaSslClientKeyFile != "" && kafkaSslCACertFile != "" {
You can’t perform that action at this time.
0 commit comments