Browse Source

error handling when kafka not ready

pull/753/head
Chris Lu 6 years ago
parent
commit
ab85118233
  1. 3
      weed/notification/kafka/kafka_queue.go

3
weed/notification/kafka/kafka_queue.go

@ -37,6 +37,9 @@ func (k *KafkaQueue) initialize(hosts []string, topic string) (err error) {
config.Producer.Return.Successes = true
config.Producer.Return.Errors = true
k.producer, err = sarama.NewAsyncProducer(hosts, config)
if err != nil {
return err
}
k.topic = topic
go k.handleSuccess()
go k.handleError()

Loading…
Cancel
Save