讓我引述JmsOutboundGateway
源代碼位:
if (logger.isWarnEnabled()) {
logger.warn("The gateway cannot use a reply listener container with a specified destination(Name/Expression) " +
"without a 'correlation-key'; " +
"a container will NOT be used; " +
"to avoid this problem, set the 'correlation-key' attribute; " +
"some consumers, including the Spring Integration <jms:inbound-gateway/>, " +
"support the use of the value 'JMSCorrelationID' " +
"for this purpose. Alternatively, do not specify a reply destination " +
"and a temporary queue will be used for replies.");
}
,有點後來在handleRequestMessage
:
if (this.replyContainer == null) {
jmsReply = this.sendAndReceiveWithoutContainer(requestMessage);
}
所以,你可以使用<int-jms:outbound-gateway>
沒有reply-listener
。 類似這樣的:
<int-jms:outbound-gateway request-destination="requestQueueA"
reply-destination="replyQueueB"
connection-factory="connectionFactory"/>
因此,設置回覆目標,「答覆偵聽器」將不會被創建?我的疑問是,臨時隊列既不會創建回覆監聽器。並設置它的答覆目的地將它添加到JMS頭,如果我有300隊列與另外300個答覆隊列配置是相當詳細的。 (事實上,JMS配置就是這樣的)。問候。 –
是的,它依賴'consumerSession.createConsumer(replyTo,messageSelector);' –
我將測試並檢查發生了什麼。韓國社交協會。 –