resilience4j bulkhead与@bulkhead在Springboot中

发布于 2025-02-11 04:10:21 字数 308 浏览 1 评论 0原文

我正在使用@BulkHead注释在Springboot中实现舱壁图案。我有这个配置 弹性4J.Bulkhead: 实例: PerformancesService: MaxConcurrentCalls:2 MaxWaitDuration:

我的服务方法上有 1毫秒 @bulkhead(name =“ performanceservice”,halldbackMethod =“ getDefaultPerformancedata”),

但是它无法正常工作。当我调用性能端点时,我直接获得getDefaultPerformancedAta()。

我做错了什么。

I am implementing bulkhead pattern in springboot using @bulkhead annotation. I have this configuration
resilience4j.bulkhead:
instances:
performanceService:
maxConcurrentCalls: 2
maxWaitDuration: 1ms

on my service method I have
@Bulkhead(name = "performanceService", fallbackMethod = "getDefaultPerformanceData")

However it is not working. When I call performance endpoint I am directly getting the getDefaultPerformanceData().

is there something I am doing wrong.

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

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

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文