Spring Cloud Data Flow (SCDF):Http 客户端处理器应用程序的重试机制在重试期间导致问题

发布于 2025-01-11 17:19:44 字数 304 浏览 3 评论 0原文

我在我的一个流中使用 Http 客户端处理器应用程序,它是 SCDF 的标准应用程序。该应用程序的目的是使用消息负载对提供的 URL 进行 http 调用。我尝试通过将布尔值 h​​ttpclient.retry.enabled 保持为“true”来启用此应用程序的重试机制。

但是,当我这样做时,即使第一次尝试成功,它也会尝试针对 http 端点重新发布消息。看起来它正在遵循“至少写入一次”的概念。这种方法的问题是,它会在目标系统中创建重复项。

有没有一种方法可以将其配置为“如果调用成功则只写入一次,否则重试”。如果没有,我们可以期待 Spring 的修复吗?

Im using Http Client Processor app in one of my stream which is a standard app of SCDF.The puspose of this app is to make http calls against provided URL with a message payload. I tried to enable the retry mechanism of this app by keeping the boolean httpclient.retry.enabled to 'true'.

But when I do that it try to repost the message against the http end point even if the first attempt is succecssfull. It looks like it is working with the concept of 'write at least once'. The problem with this approach is, it creates duplicates in the target system.

Is there a way we can configure it for 'write just once if the call is successful else, retry'. If not can we expect a fix from Spring ?

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

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

发布评论

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

评论(1

泅渡 2025-01-18 17:19:44

不再支持 Http 客户端处理器。我建议升级到 HttpRequestProcessor。这使用消息传递绑定器中包含的常见重试机制。行为正如您所描述的,仅当消费者未能确认消息时才会重试请求。有了至少一次的保证,您仍然有可能重复。

The Http Client Processor is no longer supported. I recommend upgrading to HttpRequestProcessor. This uses the common retry mechanism included in the messaging binder. The behavior is as you describe, the request will be retried only if the consumer fails to acknowledge the message. With at least once guarantees, you still have the potential for duplicates.

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