-
Notifications
You must be signed in to change notification settings - Fork 8
Flow Control – Dependencies
Dependency Format
The dependencies are how all the routing occurs for messages streaming inside the ASB. The dependency is a vector in the format
[["dependencyA","AndDependencyB"],["OrDependencyC","!NotDependencyD"],["dependencyA.error"]]
The dependency vector shown above indicates that a node will accept a message which is flowing out of a route node named dependencyA
and also must have been processed by the node AndDependencyB
successfully.
Alternatively, it will also accept a message flowing out successfully from node OrDependencyC
as long as the same message was not processed at all by the node named NotDependencyD
.
Finally, it will also accept messages which failed processing (i.e. had an error) for the route named dependencyA
.
ASB is asynchronous, and message-driven - not synchronous flow-driven, so messages get routed to nodes that can process them, as soon as the message satisfies the dependency victory for that particular ASB node. Dependency vectors allow us to build complicated micro-streams based flows, and in the simpler case, simple waterfall model-based flows.
(C) 2018 - 2021 TekMonks