我们正在分析从spring integration 4.3升级到5.x,以便在带有动态url的http出站网关的流中使用即将到来的RateLimiterRequestHandlerAdvice,但在文档中找不到示例,这可能吗?
<int-http:outbound-gateway request-channel="request"
reply-channel="response" url-expression="headers.serviceUrl"
http-method="POST" expected-response-type="java.lang.String" charset="UTF-8"/>
我看到了示例(https://docs.spring.io/spring-integration/docs/5.2.0.RC1/reference/html/handler-advice.html#rate-limiter-advice),但它们只适用于没有这种动态行为的服务激活器。
我们需要一个速率限制器为每个网址。例如,对于url1是10 tps,对于url2是20 tps。此外,如果它可以在运行时更改,那将是非常有用的。
提前感谢
发布于 2019-10-01 20:54:31
是的,它可以与任何MessageHandler
一起使用。在使用XML配置时,请使用<request-handler-advice-chain/>
子元素。
https://stackoverflow.com/questions/58177303
复制相似问题