I am trying spring cloud function with aws lambda. Lets say, I have 5 different spring function (A,B,C,D,E) and function composition of like this A|B|C|D|E.
I specify which function to invoke using spring_cloud_function_definition in lambda, so, spring_cloud_function_definition = A|B|C|D|E
Now, i want to route to other function (lets say F), from function A in certain scenario (lets say, on receive of some error code while executing in A) and not move to next functions in function composition.
What i would like to know:
Is it possible to end execution in this function composition in middle based on certain parameters.? If yes, How do i achieve.
I tried MessgaeRoutingCallback but its not working for me. I created a class that implements MessgaeRoutingCallback. I returned "F" in functiondefinition. I tried to call this functiondefinition from function "A".
On execution of composition,it goes like this A -> functiondefinition (does not route to F) -> B ->C->D->E