Spring XD - 处理器异常的自动确认问题
Spring XD - Issue with Auto Acknowledgment for Exception in Processor
我有 Spring XD 流,其中包含各种模块和为流启用的 DLQ,我无法根据流中 http 客户端重试场景的需要将其删除。在其中一个处理器中,我抛出异常并且不想将这种情况下的输出传递给流中的下一个 processor/module,我可以通过使用 Filter as
来实现这一点
<filter throw-exception-on-rejection="true" ref="batchDataFilter" method="transform"/>
在此我能够实现异常不传递到流中的下一个模块但异常正在重试,因为配置了 DLQ,我想在 exception/error 中确认此消息所以它不应该重试我可以记录此消息。
下面是我的Spring文件配置
<chain input-channel="input" output-channel="output" >
<int:transformer>
<beans:bean class="com.capitalone.batch.parser.BatchInputParser" >
<beans:property name="batchInputProperties" ref="inputfields"/>
</beans:bean>
</int:transformer>
<filter throw-exception-on-rejection="true" ref="batchDataFilter" method="transform"/>
</chain>
谢谢..
要禁用特定流模块的重试,并始终拒绝 DLQ,请使用部署属性。
deploy stream myStream --properties module.foo.consumer.maxAttempts=1,module.foo.consumer.requeue=false
您可以在 servers.yml
中的总线级别设置相同的选项。
我有 Spring XD 流,其中包含各种模块和为流启用的 DLQ,我无法根据流中 http 客户端重试场景的需要将其删除。在其中一个处理器中,我抛出异常并且不想将这种情况下的输出传递给流中的下一个 processor/module,我可以通过使用 Filter as
来实现这一点<filter throw-exception-on-rejection="true" ref="batchDataFilter" method="transform"/>
在此我能够实现异常不传递到流中的下一个模块但异常正在重试,因为配置了 DLQ,我想在 exception/error 中确认此消息所以它不应该重试我可以记录此消息。
下面是我的Spring文件配置
<chain input-channel="input" output-channel="output" >
<int:transformer>
<beans:bean class="com.capitalone.batch.parser.BatchInputParser" >
<beans:property name="batchInputProperties" ref="inputfields"/>
</beans:bean>
</int:transformer>
<filter throw-exception-on-rejection="true" ref="batchDataFilter" method="transform"/>
</chain>
谢谢..
要禁用特定流模块的重试,并始终拒绝 DLQ,请使用部署属性。
deploy stream myStream --properties module.foo.consumer.maxAttempts=1,module.foo.consumer.requeue=false
您可以在 servers.yml
中的总线级别设置相同的选项。