feat 阿里云观测平台
This commit is contained in:
@@ -23,7 +23,7 @@ type TopicQuestionAnswer struct {
|
||||
|
||||
func startConsumer() {
|
||||
kafka.NewConsumer().Consume("qgdzs.question.answer", func(ctx context.Context, msg *sarama.ConsumerMessage) error {
|
||||
log.Infof("qgdzs.question.answer: %s", string(msg.Value))
|
||||
log.Infof("Kafka topic: qgdzs.question.answer: %s", string(msg.Value))
|
||||
data := &TopicQuestionAnswer{}
|
||||
if err := json.Unmarshal(msg.Value, &data); err != nil {
|
||||
return utils.ErrorsWrap(err)
|
||||
|
||||
Reference in New Issue
Block a user