1、不开启事务异步写入kafka数据失败,报错:
开启事务写入kafka失败,报错:
2023-01-04T16:03:32.154+0800 ERROR controller/kafkaWrite.go:204 new async producer error: {"error": "kafka server: Request was for a consumer group that is not coordinated by this broker"}
客户端消费报错:
解决方法:
尝试一:尝试用kafka自带producer脚本测试是否写入成功,依然失败
尝试二:NotLeaderOrFollerException:网上查询broker已坏,所以尝试重启zookeeper,重启kafka,写入依然报同样的错。
尝试三:删除所有topic==》删除kafka日志目录(查看config/server.properties,搜过logs)==》重启kafka===>解决。