我们需要在 RabbitMQ 和 MQSeries 之间传输消息。
<int:channel id="channelRmqMQ"></int:channel>
<int-amqp:inbound-channel-adapter channel="channelRmqMQ"
queue-names=" QUEUE_OUT "
connection-factory="rabbitConnectionFactory"
auto-startup="true"
id="inboundChannelAdapter"
channel-transacted="true"
concurrent-consumers= " 1"
prefetch-count="40"
tx-size="40"
/>
<int-jms:outbound-channel-adapter channel="channelRmqMQ"
id="jmsOut"
destination="jmsQueue"
connection-factory="connectionFactoryCaching"
delivery-persistent="true"
explicit-qos-enabled="true"
session-transacted="true" >
<int-jms:request-handler-advice-chain>
<ref bean="requestHandler" />
</int-jms:request-handler-advice-chain>
</int-jms:outbound-channel-adapter>
我们要确认 RabbitMQ 队列中的消息,以防 MQSeries 中的写入良好。为此,我们channel-transacted
在 amqp 入站和session-transacted
jms 出站上使用该属性。
这是正确的方法吗?
我们如何测试消息在 MQSeries 队列中写入良好(蓝色箭头)但在向 RabbitMQ 确认期间发生错误(绿色箭头)的场景?那么是否可以在 MQSeries 上回滚?并使用来自 RabbitMQ 的此消息重试。
谢谢你的帮助。