Search code examples
javaspringspring-cloudspring-cloud-streamspring-cloud-function

Is functions composition in spring-cloud-function / spring-cloud-stream pass by value, or is it reusing the integration in between


Hi don't understand and it is not described in the documentation of either "spring-cloud-function" or "spring-cloud-stream". If I have two functions "Uppercase" and "reverse". Lets say I have a source queue - "uppercase-source" input to "Uppercase" function which does output to "uppercase-output". And then "uppercase-output" is source to "reverse" function which outputs to "reverse-output".

If I perform a function composition the following way:

--spring.cloud.function.definition=uppercase|reverse

Wil the resulting function use pass by value in between "uppercase" and "reverse", or will the resulting function still uses the queues/topics in between this would say "uppercase-output"?


Solution

  • Tested it.Spring cloud stream uses the integration in between the functions when performing composition.