The goal is to provide a batch life-cycle for nodes to integrate with
Nodes may want to process events as part of a larger transaction. For example a set of bank transfer events may make up a single transaction that prints a confirmation on completion. We could tie the confirmation node to a batch life-cycle.
Fluxtion provides two annotations that configure batch processing:
The generated SEP implements the BatchHandler interface. Applications can call the BatchHandler methods and the SEP will handle all dispatch logic to nodes on the execution graph. Batch handlers are invoked in reverse topological order.
Fluxtion event processors can be exceedingly fast, even waiting between network packets. Batch pause permits actions to execute if enough data has been received.
Example
The example shows two nodes that declare batchPause and batchEnd methods using the annotations defined. Batch invocations are in reverse topological order.
As described the node batch methods are invoked in the SEP BatchHandler interface methods. The child node does not declare any batch methods as is not included in batch callbacks.