弹簧集成延迟器元件

发布于 2024-08-03 05:06:50 字数 710 浏览 3 评论 0原文

我正在尝试配置我的 spring 集成并想要使用该元素,该元素基本上位于 retryFilter 和队列之间。

如果我直接从 retryFilter 进入队列,一切正常,但是,一旦我将延迟器元素放在它们之间,配置文件就无法加载(当其中存在错误时会发生这种情况)。

本节的配置如下:

 <!-- Retry filter -->
 <filter
  input-channel="retryChannel"
  ref="retryFilter"
  method="doRetry" 
  output-channel="queueChannel" />

 <channel id="delayChannel" />

 <delayer input-channel="delayChannel" default-delay="10000" output-channel="queueChannel"/>

 <channel id="queueChannel">
  <queue capacity="100" />
 </channel>

    <poller id="poller" default="true">
        <interval-trigger interval="1000"/>
    </poller>

非常感谢任何帮助。

戴夫

I'm trying to configure my spring integration and want to use the element, which basically sits between a retryFilter and a queue.

All works fine if I go straight from the retryFilter to the queue, however, as soon as I put the delayer element in between them, the config file fails to be loaded (as happens when there is an error in it).

Config for this section is as follows:

 <!-- Retry filter -->
 <filter
  input-channel="retryChannel"
  ref="retryFilter"
  method="doRetry" 
  output-channel="queueChannel" />

 <channel id="delayChannel" />

 <delayer input-channel="delayChannel" default-delay="10000" output-channel="queueChannel"/>

 <channel id="queueChannel">
  <queue capacity="100" />
 </channel>

    <poller id="poller" default="true">
        <interval-trigger interval="1000"/>
    </poller>

Any help greatly appreciated.

Dave

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

迷途知返 2024-08-10 05:06:50

我已经尝试了您的示例并使其在 Spring Integration 2.0.0.BUILD-SNAPSHOT 上正常工作。您可以在这里看到我的提交:

http://github.com/iwein/Spring -Integration-Sandbox/commit/c274a12f057b6750dcf18663486a99970368e68e

我更改了一些内容:

  • 通道重命名(输入、输出)而不是
    较长的名称
  • 过滤器输出到
    延迟器输入,而不是通过
    延迟器

您是否正在使用旧版本的 Spring Integration?

你可以查看我的小 gradle 项目 ( http://github.com/iwein/Spring-Integration-Sandbox/tree/master/quick-samples/router-test/)这可以帮助您进行实验。如果您仍然无法使其正常工作,那么如果您共享堆栈跟踪和您正在使用的确切版本,那就太好了。

I've tried out your sample and got it working fine on Spring Integration 2.0.0.BUILD-SNAPSHOT. You can see my commit here:

http://github.com/iwein/Spring-Integration-Sandbox/commit/c274a12f057b6750dcf18663486a99970368e68e

There are a couple of things I changed:

  • channel renames (in, out) instead of
    longer names
  • filter outputs to
    delayer input, instead of passing by
    the delayer

Are you using an older version of Spring Integration perhaps?

You can check out my little gradle project ( http://github.com/iwein/Spring-Integration-Sandbox/tree/master/quick-samples/router-test/) which could help you experiment. If you still can't get it working it would be good if you shared a stacktrace and the exact version you are using.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文