弹簧集成延迟器元件
我正在尝试配置我的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我已经尝试了您的示例并使其在 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:
longer names
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.