• 【Azure 事件中心】EventHub 中同一条消息不停的推送给消费端问题记录


    问题描述

    EventHub 中同一条消息,不停的推送给消费端,查看日志发现错误:

    Caused by: com.azure.messaging.eventhubs.implementation.PartitionProcessorException: Error in event processing callback
                    at com.azure.messaging.eventhubs.PartitionPumpManager.processEvent(PartitionPumpManager.java:280)
                    at com.azure.messaging.eventhubs.PartitionPumpManager.processEvents(PartitionPumpManager.java:314)
                    ... 12 common frames omitted
    Caused by: org.springframework.jdbc.BadSqlGrammarException: 
    ### Error querying database.  Cause: org.postgresql.util.PSQLException: ERROR: column "messageeventcode" does not exist
      Hint: Perhaps you meant to reference the column "event_code".
      Position: 2209
    ### The error may exist in file [D:\home\site\wwwroot\webapps\xxxxxx.xml]
    ### The error may involve defaultParameterMap
    ### The error occurred while setting parameters

    问题分析

    在客户端的日志中,发现消费端每一分钟都会与处理器(process event )建立,而消费端连接后,都会通过Storage Account上存储的检查点(Checkpoint)来开始消费消息,而发现检查点一直都是同一个位置Starting event processing from offset[xxxx244317],随后就出现了 Exception: Error in event processing callback 异常,导致消费端的这个进程关闭: Closing partition processor for partition 1 with close reason LOST_PARTITION_OWNERSHIP。

    这个错误由接收事件时的错误或on_event中的错误引起,关闭了处理器连接,之后重新建立的连接还是从Starting event processing from offset[xxxx244317]开始的,所以导致一直消费相同的数据。只要解决了 PARTITION_PROCESSOR 事件中所引发异常的代码后,就可以解决此问题。

    参考资料

    Event Hub CheckPoint: https://docs.azure.cn/zh-cn/event-hubs/event-hubs-features#checkpointing

  • 相关阅读:
    汽车文化【1196】
    西方经济学
    计算机组成原理【0013】
    C语言程序设计【0039】
    教育学【0405】
    管理学[9080]
    专业英语【0089】
    计算机基础1056
    letcode每日一题-上升下降字符串
    Flowable学习-flowable
  • 原文地址:https://www.cnblogs.com/lulight/p/15858723.html
Copyright © 2020-2023  润新知