在 <int-jms:inbound-channel-adapter> 上,我们可以't change/dance with the destination because there is no incoming context from our application. This kind of adapter is the entry point to the SI application. So, if you change the destination at runtime, you' ll错过来自上一个目的地的消息 .
1 回答
好吧,你有点误解了这个概念 .
在
<int-jms:outbound-channel-adapter>
中,我们可以根据requestMessage
发送到任何目的地 . 仅仅因为我们拥有对那里的控制权,而且我们不在JMS之外 .在
<int-jms:inbound-channel-adapter>
上,我们可以't change/dance with the destination because there is no incoming context from our application. This kind of adapter is the entry point to the SI application. So, if you change the destination at runtime, you' ll错过来自上一个目的地的消息 .虽然是,但您可以使用
JmsDestinationPollingSource.setDestination()/setDestinationName()
进行更改 . 您可以实现像[INBOUND_CHANNEL_ADAPTER_ID].source
那样引用bean .您无法在JMS,BTW中收听来自一个消费者的多个目的地 . 所以,你真的被迫在你的应用程序中有几个入站适配器 .