Java spring integration inboundChannelAdapter一次生成多条消息?
在本例中,我尝试定义一个InboundChannelAdapter来从队列API azure读取消息。本机方法如下所示:Java spring integration inboundChannelAdapter一次生成多条消息?,java,spring,spring-integration,Java,Spring,Spring Integration,在本例中,我尝试定义一个InboundChannelAdapter来从队列API azure读取消息。本机方法如下所示: @Bean @InboundChannelAdapter(value = "myChannelExample", poller = @Poller(fixedDelay = "1000", maxMessagesPerPoll = "1
@Bean
@InboundChannelAdapter(value = "myChannelExample",
poller = @Poller(fixedDelay = "1000",
maxMessagesPerPoll = "1"))
public MessageSource<QueueMessage> queueReadingMessageSource() {
return wrapMessage(queueClient.readMessage())
}
这正如预期的那样工作-但我想知道是否有一种更有效的方法来定义一个适配器,该适配器能够从消息源一次读取多条maxMessagesPerPoll>1消息?是否有允许返回消息列表的messageSource接口?您只需返回带有列表负载的消息并在下游添加拆分器即可