synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hubert, Eric" <Eric.Hub...@foxmobile.com>
Subject Problem with empty load balance groups
Date Thu, 12 Mar 2009 22:18:56 GMT
Hi all,

Today I stumbled over an issue with a misconfiguration in synapse.xml.

A loadbalancing group did not contain any endpoints.

Currently this case is not handled in the code very nicely.
If the send mediator is used with the load balancing group, the client
does not get a response and blocks until the client-side timeout is
reached.

What happens inside Synapse? At startup the empty loadbalance group is
not detected, but as a consequence the loadbalancing algorithm is not
set inside the LoadbalancingEndpoint. During the execution of the send
method getNextChild() unconditionally accesses the uninitialized
algorithm member which causes an NPE which is flying through the layers
and breaks the mediation chain.

Obviously this is not the correct behaviour. I could work on a patch
fixing the problem, but would like to discuss the correct behaviour in
advance. 

Two solutions would be acceptable to me:
a) The ESB does not start if a load balancing group is empty and output
the name(s) of the empty laodbalance groups. This approach might cause
compatibility issues with existing (mis)configurations. Also unused
configuration parts would cause Synapse not to start. On the other hand
this is "fail fast" and if we would have a schema, this configuration
would probably be disallowed.

b) At runtime the problem is detected and a fault is sent to the client
indicating that no member of a loadbalancing group are available.

Do you have other solutions in mind? What solution do you prefer?

Regards,
  Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@synapse.apache.org
For additional commands, e-mail: dev-help@synapse.apache.org


Mime
View raw message