Difference between Spring Cloud Task and Spring Batch?

こ雲淡風輕ζ 提交于 2020-08-06 06:33:04

问题


I went through the Introducing Spring Cloud Task, but things are not clear for the following questions.

I'm using Spring Batch

1) What's the use of Spring Cloud Task when we already have the metadata provided by Spring Batch ?

2) We're planning to use Spring Cloud Data Flow to monitor the Spring Batch. All the batch jobs can be imported into the SCDF as task and can be sceduled there, but don't see support for MongoDB. Hope MySQL works well.

What is the difference between Spring Cloud Task and Spring Batch?


回答1:


Spring Cloud Task has a broader scope than Spring Batch. It is designed for any short lived task, including but not limited to (Spring) Batch jobs. A short lived task could be a Java process, a shell script, a Docker container, etc. Spring Cloud Task has its own meta-data tables to track the progress/status/stats of tasks.

In the context of Spring Batch, Spring Cloud Task provides a number of additional features:

  • Batch informational messages: ability to emit messages based on Spring Batch listeners events. Those messages can be consumed by streaming apps and make it possible to bridge tasks and streaming apps.
  • DeployerPartitionHandler: an additional partition handler that is suitable to cloud environments to dynamically deploy workers in a remote partitioning setup.


来源:https://stackoverflow.com/questions/61579987/difference-between-spring-cloud-task-and-spring-batch

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!