Stateful Functions’ I/O modules allow functions to receive and send messages to external systems.
Based on the concept of Ingress (input) and Egress (output) points, and built on top of the Apache Flink® connector ecosystem, I/O modules enable functions to interact with the outside world through the style of message passing.
An Ingress is an input point where data is consumed from an external system and forwarded to zero or more functions.
It is defined via an IngressIdentifier and an IngressSpec.
An ingress identifier, similar to a function type, uniquely identifies an ingress by specifying its input type, a namespace, and a name.
The spec defines the details of how to connect to the external system, which is specific to each individual I/O module. Each identifier-spec pair is bound to the system inside an stateful function module.
A router is a stateless operator that takes each record from an ingress and routes it to zero or more functions.
Routers are bound to the system via a stateful function module, and unlike other components, an ingress may have any number of routers.
When defined in yaml, routers are defined by a list of function types.
The id component of the address is pulled from the key associated with each record in its underlying source implementation.
Egress is the opposite of ingress; it is a point that takes messages and writes them to external systems.
Each egress is defined using two components, an EgressIdentifier and an EgressSpec.
An egress identifier uniquely identifies an egress based on a namespace, name, and producing type.
An egress spec defines the details of how to connect to the external system, the details are specific to each individual I/O module.
Each identifier-spec pair are bound to the system inside a stateful function module.
Stateful functions may then message an egress the same way they message another function, passing the egress identifier as function type.