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 事件中所引发异常的代码后,就可以解决此问题。

 

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

 

 

 

参考资料

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

 

相关文章:

  • 2021-11-21
  • 2021-10-14
  • 2021-08-11
  • 2021-04-07
  • 2022-12-23
  • 2021-10-18
  • 2021-12-05
  • 2021-04-17
猜你喜欢
  • 2021-10-04
  • 2022-12-23
  • 2021-10-14
  • 2022-01-15
  • 2022-02-05
  • 2022-12-23
  • 2021-04-25
相关资源
相似解决方案