开发者社区 > 大数据与机器学习 > 实时计算 Flink > 正文

运行一段时间 就出现这个kafka事务问题

Producer attempted an operation with an old epoch. Either there is a newer producer with the same transactionalId, or the producer's transaction has been expired by the broker.

展开
收起
爱喝咖啡嘿 2023-01-03 14:34:45 464 0
1 条回答
写回答
取消 提交回答
  • 十分耕耘,一定会有一分收获!

    报错中提及的epoch是记录事务所处的状态用的(理解为事务的元数据信息记录):We introduce the notion of a producer epoch, which enables us to ensure that there is only one legitimate active instance of a producer with a given TransactionalId, and hence enables us to maintain transaction guarantees in the event of failures.

    Kafka事务的详细流程官方的wiki上有说明,详见参考中的第二个链接,这里就不搬运了...kafka事务每个阶段都会有对应的状态。后续有空再研究研究吧...个人其实不太想投入太多时间在kafka上,毕竟它还是挺稳定的。
    
    2023-01-04 07:54:57
    赞同 展开评论 打赏

实时计算Flink版是阿里云提供的全托管Serverless Flink云服务,基于 Apache Flink 构建的企业级、高性能实时大数据处理系统。提供全托管版 Flink 集群和引擎,提高作业开发运维效率。

热门讨论

热门文章

相关电子书

更多
Java Spring Boot开发实战系列课程【第16讲】:Spring Boot 2.0 实战Apache Kafka百万级高并发消息中间件与原理解析 立即下载
MaxCompute技术公开课第四季 之 如何将Kafka数据同步至MaxCompute 立即下载
消息队列kafka介绍 立即下载