java - 所有这些消息从哪里来?

标签 java spring-integration eai

此配置工作正常,但应该每 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/

相关文章:

java - 如何选择主题与队列

java - mysql jdbc 即使在 rewriteBatchedStatements = true 之后也不批处理查询

java - Jackson - 将 class1 的 json 表示形式的对象类型字段映射到 class2

java - 使用 Spring Integration 的带有 Dataflow 的 Google PubSub

Mule ESB 与 Spring 集成

java - 如何使用 request-handler-advice-chain 和 ExpressionEvaluatingRequestHandlerAdvice?

terminology - ESB 和 EAI 的区别

integration - 如何使用功能点来评估 EAI 项目?

java - 如何通过 JavaFX WebEngine 通过 CSS 类名获取 HTML 元素?

java - 在 Spring Webflow 中映射对象时出现 FlowInputMappingException