【问题标题】:Mule Persistent storage骡子持久存储
【发布时间】:2013-06-04 05:53:09
【问题描述】:

我正在尝试使用持久队列存储从意外故障中恢复。我的骡子版本是3.3.1

我从队列中提取消息并进入“直到成功”循环。如果 mule 出于某种原因停止,我希望消息是持久的。

这是我的相关代码

<spring:bean id="outboundStore" class="org.mule.util.store.QueuePersistenceObjectStore" />

<until-successful objectStore-ref="outboundStore" 

我没有看到 .mule 目录中的消息。我做错了什么?

如果问题不清楚,请见谅。

按要求添加流:

<flow name="InitialFlow" processingStrategy="synchronous">
    <inbound-endpoint ref="firstQueue"/>
    <until-successful objectStore-ref="outboundStore" maxRetries="6" secondsBetweenRetries="5" deadLetterQueue-ref="secondQueue" failureExpression="groovy:message.getInvocationProperty('soapResponse') == 'BAD'">
        <flow-ref name="somSubFlow" />
    </until-successful>
</flow>

<sub-flow name="someSubFlow">
<http:outbound-endpoint ref="someEndpoint" exchange-pattern="request-response" method="GET" />  
</sub-flow>

如果您需要更多信息,请告诉我。

【问题讨论】:

  • 请完整提供流程配置。它可能有助于解决问题。

标签: queue mule persistent


【解决方案1】:

使用与您的配置非常相似的配置,我完全可以看到写在.mule/queuestore/queuestore 目录中的消息等待发送。

我唯一能想到的是这个表达式 groovy:message.getInvocationProperty('soapResponse') == 'BAD' 的一个问题,它会以某种方式扰乱处理。

这个表达正确吗?为什么不使用 MEL?

【讨论】:

  • groovy 表达式适用于重试,但我可以将其更改为 MEL。需要一些时间来弄清楚 MEL :) 对不起......新手。感谢您的答复。明天早上我会发布我的发现。
  • 只是出于好奇,在 vm:endpoint 上是否需要进行任何特定设置?对不起,我没有我的代码,否则会提供。我认为我的代码类似于
  • 我删除了失败表达式,但没有运气。我想提一下,我正在从 STS 中启动 Mule 服务器。这和它有关系吗?
  • 我在本地 mule 服务器上部署了应用程序,它运行良好!显然,当我从 STS 中启动 mule 服务器时,它不起作用。有更多知识的人可以提供一些启发:)
  • 不,我从普通的 Eclipse 开始——不是 Mule Studio——我的文件系统存储 until-sucessful 工作正常。为了清楚起见,我将在 VM 端点上指定交换模式。您是否更多地考虑过什么可能是您的案例的良好失败表达?也许检查 HTTP 调用的状态代码,而不是检查名为 soapResponse 的随机流变量。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2010-11-12
  • 2017-07-25
  • 2018-07-04
  • 2020-06-02
  • 2012-02-02
  • 2021-11-11
相关资源
最近更新 更多