{ c := NewKafkaConsumer(TopicThreadSaveBuffer) threadDB := InitMongoDB(MongoDBNameThread) config := &serverSaveProcessor.Config{ AccountClient: i.accountCli, TopicProducer: TopicThreadEvent, LineAPI: serverSaveAPI.NewFetchProfile(&http.Client{}), } p := serverSaveProcessor.NewService(config) c.Use(p) go func() { if err := c.Consume(); err != nil { logger.Panic(errors.Wrap(err, "[StartThreadServerSave]: unable to start consume message")) } }() }