运行一段时间 就出现这个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 611 分享 版权
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 集群和引擎,提高作业开发运维效率。

收录在圈子:
实时计算 Flink 版(Alibaba Cloud Realtime Compute for Apache Flink,Powered by Ververica)是阿里云基于 Apache Flink 构建的企业级、高性能实时大数据处理系统,由 Apache Flink 创始团队官方出品,拥有全球统一商业化品牌,完全兼容开源 Flink API,提供丰富的企业级增值功能。
还有其他疑问?
咨询AI助理