I have been having trouble off and on with this, and at first it seemed like spring integration broke altogether when using a service activator on a function with no return value (void).
So a typical use case would be...
So starting from the gateway we go through the messaging system and end up at the actual Service Actviator / UserDAO which then updates the user and has no return (void).
What is the expected behaviour here because the spring integration manual doesnt clearly explain anything about void methods, is this supposed to work fine? Or should I be using an out-bound channel adapter? (Which is broken btw, expressions do not work which means I have to force the receiving method to handle the actually message object binding me to the spring framework which isnt great . )
Also has anyone ever had problems with going through two gateways? For example I have a Credentials Authenticator Service which contains an ILoginManager interface (gateway injected), and I make a call to the loginmanager (which goes through the gateway) and then the LoginManager makes a call to ISessionManager (another injected gateway) but I keep getting this problem with unexpected return values but everything looks fine I always return the correct payload that the function call on the interface is expecting.
I guess to summarise...
Can the call stack go through multiple gateways without any issues.
What is the correct way to activate a void function.
And if there isnt anything wrong with that then I must be doing something wrong.
I would be very grateful if anyone has any advice! I appear to be on Spring Integration 2.0.4 if thats any help. Thanks!