diff --git a/config/config.go b/config/config.go index 797e0e8..19a60c4 100644 --- a/config/config.go +++ b/config/config.go @@ -26,6 +26,7 @@ type Kafka struct { Balancer string `yaml:"balancer"` Brokers []string `yaml:"brokers"` MetadataTopics []string `yaml:"metadataTopics"` + RejectionLog RejectionLog `yaml:"rejectionLog"` ProducerMaxAttempts int `yaml:"producerMaxAttempts"` ReadTimeout time.Duration `yaml:"readTimeout"` WriteTimeout time.Duration `yaml:"writeTimeout"` @@ -36,7 +37,6 @@ type Kafka struct { Compression int8 `yaml:"compression"` SecureConnection bool `yaml:"secureConnection"` AllowAutoTopicCreation bool `yaml:"allowAutoTopicCreation"` - RejectionLog RejectionLog `yaml:"rejectionLog"` } type RejectionLog struct { diff --git a/kafka/rejection_log_sink_response_handler.go b/kafka/rejection_log_sink_response_handler.go index 7b31c25..e6f996a 100644 --- a/kafka/rejection_log_sink_response_handler.go +++ b/kafka/rejection_log_sink_response_handler.go @@ -11,10 +11,10 @@ import ( ) type RejectionLogSinkResponseHandler struct { - Config config.Kafka KafkaClient Client Writer *kafka.Writer Topic string + Config config.Kafka } func (r *RejectionLogSinkResponseHandler) OnInit(ctx *SinkResponseHandlerInitContext) { @@ -81,7 +81,7 @@ func NewRejectionLogSinkResponseHandler() SinkResponseHandler { type RejectionLog struct { Topic string - Key []byte Value string Error string + Key []byte }