我使用非常簡單的流程,從第一個流程中,我從AMQP(確認模式:Manual
)中獲取消息並將其傳遞給第二個流通過VM流動,在第二個流程中,我使用AMQP確認處理器確認每條消息。當通過Mule ESB中的VM端點時,會話變量被消除(使用AMQP)
當我們使用VM時,交付標籤和通道標籤都將被清除(這對於此地址AMQP acknowledgement mule中描述的AMQP確認消息處理器是必需的)。所以我試圖在會話變量中保存交付標籤和amqp.channel。
第一次我想知道,存儲在會話變量中的通道值在通過虛擬機時被刪除,但能夠看到交付標籤。
觀察:
- 而不是如果我們使用
flow-ref
。它工作正常。但在我的情況下,我只需要使用虛擬機。 amqp.delivery標籤
type
(java.lang.Long中) amqp.channeltype
(com.rabbitmq.client.impl.ChannelN)。如果'類型'的amqp.channel導致問題。如果是這樣,我怎麼能保存這個會話變量。請建議。請找到我的配置xml。
<flow name="testrabbitmqFlow1" doc:name="testrabbitmqFlow1" > <amqp:inbound-endpoint queueName="amqp.test.queue" exchangeDurable="true" queueDurable="true" responseTimeout="1000000" connector-ref="AMQP_Test" doc:name="AMQP"> <amqp:transaction recoverStrategy="REQUEUE" action="ALWAYS_BEGIN"/> </amqp:inbound-endpoint> <byte-array-to-string-transformer doc:name="Byte Array to String"/> <set-session-variable variableName="storedeliveryTag" value="#[flowVars['amqp.delivery-tag']]" doc:name="Session Variable"/> <set-session-variable variableName="storeChannel" value="#[flowVars['amqp.channel']]" doc:name="Session Variable"/> <vm:outbound-endpoint exchange-pattern="one-way" path="/test" doc:name="VM"> <vm:transaction action="NONE"/> </vm:outbound-endpoint>
是否有任何人知道如何解決這個問題。