Description
Expected Behavior
If I use DirectChannel and subscribe to it many ServiceActivators I would like to handle error - by failover strategy on DirectChannel level - not on ErrorChannel. Reason of having many subscribes on one channel is having load balancing.
So if there will be expected Exception I could stop processing and pass it to error channel instead of passing message to other subscriber.
Example - to one Direct channel I have connected two JmsOutboundGateway - both have same logic but they are connected to different mq servers - to have load balancing.
I have request that I process in my app and if I'm sending something via JmsOutboundGateway in case of MessageTimeoutException - due to long timeout I want to stop processing whole request in my app ( timeout for whole request is short). But in case its different error for example problem with connection JmsOutboundGateway to mq I want to use other subscribers connected to different server (use failover strategy).
Current Behavior
Currently I can't do conditional failover - if something fails other subscribers will be involved. I can turn off failover in channel and build some flows with ErrorMessageExceptionTypeRouter but then I will have to implement by my own round robin and failover strategy.
Context
How has this issue affected you?
A lot of custom development.
What are you trying to accomplish?
App with high volume of request with load balancing.
What other alternatives have you considered?
Coding everything myself.
Are you aware of any workarounds?
Yes. I'd like to avoid them.