【发布时间】:2014-01-07 06:14:53
【问题描述】:
我有一个生产应用程序似乎间歇性地丢失消息。我已经确定的一个示例是发送系统记录 3 条消息,这些消息相隔几毫秒发送。接收系统记录它收到消息 1 和消息 3...但没有收到消息 2。队列的深度为 0。我在读取消息的应用程序的日志中没有看到任何错误,表明发生了不好的事情。
我已验证没有其他“流氓”客户端为读取消息创建竞争条件。
这是我的配置;我们有一个主要和次要/故障转移队列...
<bean id="primaryProficiencyInboundQueue" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueManagerName" value="${lsm.primary.outbound.manager}"/>
<property name="baseQueueName" value="${lsm.proficiency.inbound.queue}"/>
</bean>
<bean id="secondaryProficiencyInboundQueue" class="com.ibm.mq.jms.MQQueue">
<property name="baseQueueManagerName" value="${lsm.secondary.outbound.manager}"/>
<property name="baseQueueName" value="${lsm.proficiency.inbound.queue}"/>
</bean>
<int:channel id="inboundProficiencyChannel">
<int:interceptors>
<int:wire-tap channel="logger" />
</int:interceptors>
</int:channel>
<!-- adapter that connects the inbound proficiency queues to the inboundProficiencyChannel -->
<jms:message-driven-channel-adapter id="primaryProficiencyInboundAdapter"
connection-factory="primaryConnectionFactory"
destination="primaryProficiencyInboundQueue"
channel="inboundProficiencyChannel" />
<jms:message-driven-channel-adapter id="secondaryProficiencyInboundAdapter"
connection-factory="secondaryConnectionFactory"
destination="secondaryProficiencyInboundQueue"
channel="inboundProficiencyChannel" />
<int:service-activator id="proficiencyInboundActivator"
input-channel="inboundProficiencyChannel">
<bean class="com.myactivator.LSMInboundProficiencyActivator" />
</int:service-activator>
有没有可能是某事默默地失败了?
另一件值得注意的事情是,有两台生产服务器都按照上述方式进行配置......这意味着有两台服务器配置了 JMS 适配器来读取消息。我在上面提到我看到消息 1 和消息 3 正在阅读。在这种情况下,我看到服务器 1 处理消息 1 和服务器 2 处理消息 2 ......所以看起来像上面配置的两台服务器没有负面影响。关于可能发生的事情或我如何调试丢失/丢失消息的情况有任何其他想法吗?
版本信息:
- 春季 - 3.0.5.RELEASE
- Spring 集成 - 2.0.3.RELEASE
【问题讨论】:
标签: spring jms spring-integration