wso2 / micro-integrator

The cloud-native configuration driven runtime that helps developers implement composite microservices.
https://wso2.com/integration/
Apache License 2.0
202 stars 218 forks source link

Loadbalancing endpoint issues #3357

Open TomasWso2 opened 3 months ago

TomasWso2 commented 3 months ago

When using a loadbalance endpoint, after the call to the 3 defined endpoints in first "LoadBalanceEndpoints" fail, there is an additional unexpected to call to a different loadbalanced endpoint(previously called endpoint).

Expected behavior: 1 call to FirstEndpoint and then 3 calls to the LoadBalanceEndpoints.

Current behavior: 1 call to FirstEndpoint , then 3 calls to the LoadBalanceEndpoints and then 1 call to FirstEndpoint .

The load balancer endpoint will be added as a FaultHandler. However after a successful invocation, only the child endpoint will be removed from the FaultStack. As a result when the LoadBalanceEndpoints LoadBalancer EP fails, it will invoke FirstEndpoint as the next fault handler.