Using a Reactor to Manage Dependent Tasks

I have a usecase where some messages appear, and each of them launches a set of tasks, some of them may depend on each other, i.e. TaskD requires the results of TaskA and TaskB, and TaskC is independent of these tasks and can work in parallel.

The tasks and dependencies for each message may vary; it is configured for each type of message. All tasks must be completed in order to preserve the final processing results.

Some kind of pseudo configuration for dependency management.

[MsgType = aa]

  • Task
  • Taskb
  • Taskc
  • TaskD, depends = TaskA, TaskB

I am using Java 8 and spring-boot. Can you advise me a better approach to solving this problem with help reactor? Does reactorit fit here?

+4
source share

Source: https://habr.com/ru/post/1669757/


All Articles