此配置工作正常,但应该每 15 秒轮询一次的入站 channel 适配器正在连续运行。有人知道我做错了什么吗?
<si:channel id="msgChannel" />
<si:inbound-channel-adapter ref="jdbcInputAdapter"
method="fetchData" channel="msgChannel">
<si:poller>
<si:interval-trigger interval="15000" />
</si:poller>
</si:inbound-channel-adapter>
<si:outbound-channel-adapter ref="shouter" method="shout" channel="msgChannel"/>
最佳答案
默认情况下,轮询器会从每次轮询的 channel 或源中获取所有消息。您可以使用 max-messages-per-poll
属性对此进行调整。如果您将其设置为 1,您将看到您期望的行为。
关于java - 所有这些消息从哪里来?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2820810/