【问题标题】:How to suspend or reduce throughput of Camel Hazelcast SEDA consumer in case of error发生错误时如何暂停或减少 Camel Hazelcast SEDA 消费者的吞吐量
【发布时间】:2015-07-31 23:43:34
【问题描述】:

我有一条 Camel 路线使用来自 Hazelcast SEDA 队列的消息。如果处理消息时出现任何错误,我想减少消耗的吞吐量,以避免将大量消息移动到死信队列。我一直在调查使用http://camel.apache.org/throttler.html 进行黑客攻击 具有动态值和断路器:http://camel.apache.org/load-balancer.html 但没有成功。

还有其他方法可以做到这一点吗?

【问题讨论】:

    标签: apache-camel hazelcast hystrix


    【解决方案1】:

    为了提供此功能,我结束了构建自己的(也是第一个)Camel 组件:

    https://github.com/rodolfodpk/camel-hz-queue

    【讨论】:

      【解决方案2】:

      是您的另一条骆驼路线向该 Seda 消费者发送消息吗?在这种情况下,您可以在该端点上使用 Throttler。像这样的:

      <route>
        <from uri="....." />
        <throttle maximumRequestsPerPeriod="3" timePeriodMillis="10000">
          <to uri="hazelcast:seda:foo" />
        </throttle>
      </route>
      
      <route>
        <from uri="hazelcast:seda:foo" />
        <to uri="....." />
      </route>
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2013-04-16
        • 2020-10-13
        • 2012-07-05
        • 2015-04-09
        • 2020-08-22
        • 2022-01-22
        • 1970-01-01
        • 2015-10-12
        相关资源
        最近更新 更多