消息驱动通道适配器或JMS网关的错误通道

时间:2017-03-01 23:15:10

标签: java spring web-services jms spring-jms

有人可以帮助我解决我遇到的问题。

我有一个服务激活器类,它对于Web服务网关和JMS适配器类是常见的(这意味着我要求从Web服务网关通道和MQ适配器通道进入此类)

我在此激活器中抛出异常。我已经能够处理Web服务流的这些异常,因为我已经在网关中为webservices流定义了一个错误通道。

但是,当消息来自MQ时,我无法处理抛出的这些异常。

这是我的WebService网关:

<int:gateway id="avengersGenericServiceRestGateway" service-interface="com.foo.AvengersAnalysisProcessingV001" error-channel="avengersWsErrorChannel">
    <int:method name="hulcTransactionRisk" request-channel="hulcTransactionRiskAuthChannel" reply-channel="avengersGenericServiceOutputChannel" reply-timeout="1000" />
    <int:method name="hulcPartyRisk" request-channel="hulcPartyRiskAuthChannel" reply-channel="avengersGenericServiceOutputChannel" reply-timeout="1000" />
    <int:method name="callBlackWidow" request-channel="callBlackWidowAuthChannel" reply-channel="avengersGenericServiceOutputChannel" reply-timeout="1000" />
</int:gateway>

这是我的MQ适配器通道:

 <int-jms:message-driven-channel-adapter container="avengersEventMessageListenerContainer" channel="avengersExecutionFlowRouterChannel" />

我一直在寻找为jms-adapter定义错误通道的选项,我找不到任何东西。

如何为从MQ进入JMS适配器的事件定义错误通道。

提前致谢。

1 个答案:

答案 0 :(得分:0)

您使用的是哪个版本?

消息驱动的频道适配器自2.0,6年多以来就有错误频道。

commit here

也许你正在看互联网上的旧版本模式;请参阅顶部的* Important Note *,了解为什么必须继续反映1.0架构。

Spring从类路径上的jar中解析了无版本模式;它不使用互联网版本。

相关问题