如何使用入站通道适配器轮询器解决异常



С找不到答案
Spring版本5.0.6.
我的配置:

<int:channel id="data"/>
<int:inbound-channel-adapter 
id="dataAdapter"                                                                    
channel="data"                                    
auto-startup="false"
ref="dataGetter"
method="myMessageSource">
<int:poller max-messages-per-poll="10"/>
</int:inbound-channel-adapter>
<beans:bean
class="org.endpoints.DataGetter"
id="dataGetter"/>

抛出异常:

Configuration problem: A <poller> must have one and only one trigger configuration.

如果没有轮询器:

No poller has been defined for channel-adapter 'dataAdapter', and no default poller is available within the context.

如何正确设置轮询器?

查看您的配置:

<int:poller max-messages-per-poll="10"/>

您不满足具有或fixed-delayfixed-ratecron或仅具有trigger引用的条件:https://docs.spring.io/spring-integration/docs/5.0.6.RELEASE/reference/html/messaging-endpoints-chapter.html#endpoint-命名空间

最新更新