【问题标题】:Spring Batch Partitioned Jobs - Problem with MessageChannelPartitionHandlerSpring Batch 分区作业 - MessageChannelPartitionHandler 的问题
【发布时间】:2020-08-27 11:04:10
【问题描述】:

我们正在从 Spring Batch 2.2 升级到 Spring Batch 4.1。我的配置如下所示: Spring Batch Partition Job Aggregation Problems 当我启动服务器时,我看到以下日志消息(我正在尝试使用 JMS 响应运行)。

Caused by: org.springframework.integration.handler.support.MessagingMethodInvokerHelper$IneligibleMethodException: Found more than one parameter type candidate: [org.springframework.batch.core.partition.StepExecutionSplitter] and [org.springframework.batch.core.StepExecution]

结果是消息聚合没有按预期工作。我看到消息进入了几个 MessageStore,而不是所有返回消息都进入 AggregatorMessageHandler 中的单个 MessageStore。日志清楚地显示了将传入消息放入 2 个不同组的添加消息。 (我缩短了消息内容以提高可读性)。

2020-08-26 17:14:05,778 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-3) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[], timestamp=1598483645777, lastModified=0}]
2020-08-26 17:14:08,342 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-4) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[], timestamp=1598483648342, lastModified=0}]
2020-08-26 17:14:08,538 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-2) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[
    GenericMessage [payload=StepExecution: id=51, version=3, name=partitioned.step:0, status=COMPLETED, exitStatus=COMPLETED, ...], timestamp=1598483645778, lastModified=1598483645778}
2020-08-26 17:14:12,117 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-5) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[
    GenericMessage [payload=StepExecution: id=52, version=3, name=partitioned.step:2, status=COMPLETED, exitStatus=COMPLETED, ...]], timestamp=1598483645778, lastModified=1598483645778}
2020-08-26 17:14:13,680 TRACE [AggregatingMessageHandler] (springbatch.taskExecutor-1) Adding message to group [ SimpleMessageGroup{groupId=4:partitioned.step, messages=[
    GenericMessage [payload=StepExecution: id=51, version=3, name=partitioned.step:0, status=COMPLETED, exitStatus=COMPLETED, ...], 
    GenericMessage [payload=StepExecution: id=49, version=3, name=partitioned.step:4, status=COMPLETED, exitStatus=COMPLETED, ], timestamp=1598483645778, lastModified=1598483648538}]

这是由于启动时的调试消息造成的吗?我该如何解决这个问题?据我所知,我正在遵循通过 JMS 配置分区作业的示例。 (春季批次 4.1)

提前感谢您的任何建议。

【问题讨论】:

    标签: spring-integration spring-batch


    【解决方案1】:

    尝试使用method="aggregate" 为分区处理程序配置聚合器。看起来解析器也尝试使用来自MessageChannelPartitionHandlerhandle(StepExecutionSplitter, StepExecution) 作为候选对象。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-11-09
      • 2017-06-15
      • 1970-01-01
      • 1970-01-01
      • 2019-06-09
      • 2014-12-24
      相关资源
      最近更新 更多