public class RetryableLoadBalancerExchangeFilterFunction extends Object implements org.springframework.web.reactive.function.client.ExchangeFilterFunction
ExchangeFilterFunction
that uses ReactiveLoadBalancer
to execute
requests against a correct ServiceInstance
and Reactor Retries to retry the
call both against the same and the next service instance, based on the provided
LoadBalancerRetryPolicy
.Constructor and Description |
---|
RetryableLoadBalancerExchangeFilterFunction(LoadBalancerRetryPolicy retryPolicy,
ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory,
LoadBalancerRetryProperties retryProperties) |
RetryableLoadBalancerExchangeFilterFunction(ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory,
LoadBalancerRetryProperties retryProperties) |
Modifier and Type | Method and Description |
---|---|
protected reactor.core.publisher.Mono<Response<ServiceInstance>> |
choose(String serviceId,
Request<RetryableRequestContext> request) |
reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientResponse> |
filter(org.springframework.web.reactive.function.client.ClientRequest clientRequest,
org.springframework.web.reactive.function.client.ExchangeFunction next) |
public RetryableLoadBalancerExchangeFilterFunction(LoadBalancerRetryPolicy retryPolicy, ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, LoadBalancerRetryProperties retryProperties)
public RetryableLoadBalancerExchangeFilterFunction(ReactiveLoadBalancer.Factory<ServiceInstance> loadBalancerFactory, LoadBalancerRetryProperties retryProperties)
public reactor.core.publisher.Mono<org.springframework.web.reactive.function.client.ClientResponse> filter(org.springframework.web.reactive.function.client.ClientRequest clientRequest, org.springframework.web.reactive.function.client.ExchangeFunction next)
filter
in interface org.springframework.web.reactive.function.client.ExchangeFilterFunction
protected reactor.core.publisher.Mono<Response<ServiceInstance>> choose(String serviceId, Request<RetryableRequestContext> request)
Copyright © 2021 Pivotal Software, Inc.. All rights reserved.