We have a need to develop on-demand applications on the lines of FRP (something similar to AWS Lambda) on our private Cloud Foundry stack. This is in order to save cost on otherwise always running low volume applications.
The need is to trigger/start the application only when a message comes on our JMS based messaging system (e.g. IBM MQ). Being a low volume application, it should remain stopped all other times.
Based upon the detailed study and search through Spring documents, it appears to me that, a desired solution that triggers/start my microservice whenever a message appears on the source queue and shuts it down when done, will need a combination of: Spring Cloud Data Flow + Spring Cloud Stream + Spring Cloud Task as the technology stack.
Out of the various samples, below combination looks like the one needed to start PoC on local machine:
https://github.com/spring-cloud/spring-cloud-task/tree/master/spring-cloud-task-samples/tasksink https://github.com/spring-cloud/spring-cloud-stream-samples/tree/master/sink https://github.com/spring-cloud/spring-cloud-dataflow/tree/master/spring-cloud-dataflow-server-local
However am still unsure how to plug it all and achieve the results.
Some progress is made but the full clarity of architecting this solution is still unclear.
To best of my understanding it appears that we need to...
- run a Spring Cloud DataFlow Server
- run Spring Cloud DataFlow Shell or UI
- create Spring Cloud Stream sink application and run it (do we need to install it in Maven as well?)
- create Spring Cloud Task sink application and install it in Maven Repo
- do I need a Spring Cloud Task as well created?
- register modules (but what are modules for this case?)
- create Stream in DF Server and deploy on it
- anything more?
...to achieve the results.
Can someone help me in this and suggest is any building block is missed out from here? And if the answers to questions above are known.
Also are there any gaps in my understanding, and am I assuming it correctly enough that @EnableTask
will make my application run only when triggered and keep it stopped otherwise?