作者 唐旭辉

调试

@@ -95,9 +95,9 @@ func NewRuner() *Runer { @@ -95,9 +95,9 @@ func NewRuner() *Runer {
95 95
96 func (r *Runer) InitConsumer() error { 96 func (r *Runer) InitConsumer() error {
97 config := sarama.NewConfig() 97 config := sarama.NewConfig()
98 - config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRoundRobin 98 + //config.Consumer.Group.Rebalance.Strategy = sarama.BalanceStrategyRoundRobin
99 config.Consumer.Offsets.Initial = sarama.OffsetNewest 99 config.Consumer.Offsets.Initial = sarama.OffsetNewest
100 - config.Version = sarama.V0_10_2_1 100 + config.Version = sarama.V0_10_2_0
101 consumerGroup, err := sarama.NewConsumerGroup(r.msgConsumer.kafkaHosts, r.msgConsumer.groupId, config) 101 consumerGroup, err := sarama.NewConsumerGroup(r.msgConsumer.kafkaHosts, r.msgConsumer.groupId, config)
102 if err != nil { 102 if err != nil {
103 return err 103 return err
@@ -21,7 +21,7 @@ func init() { @@ -21,7 +21,7 @@ func init() {
21 var err error 21 var err error
22 mqConfig := sarama.NewConfig() 22 mqConfig := sarama.NewConfig()
23 mqConfig.Producer.Return.Successes = true 23 mqConfig.Producer.Return.Successes = true
24 - mqConfig.Version = sarama.V0_10_2_1 24 + mqConfig.Version = sarama.V0_10_2_0
25 if err = mqConfig.Validate(); err != nil { 25 if err = mqConfig.Validate(); err != nil {
26 msg := fmt.Sprintf("Kafka producer config invalidate. config: %v. err: %v", configs.Cfg, err) 26 msg := fmt.Sprintf("Kafka producer config invalidate. config: %v. err: %v", configs.Cfg, err)
27 logs.Info(msg) 27 logs.Info(msg)