Stream Interconnect is a feature in that enables the user to forward output data from one stream to be processed by another stream. This feature helps with flexibility in reusing streams with a common logic and avoid having large streams with complex business logic.
The Stream Interconnect feature comprises of two functions, one which acts as a collector and the other as a forwarder. The names of the collector and forwarder functions are:
- Interconnect Receiver (Collector)
- Interconnect Sender (Forwarder)
Interconnect Receiver
The Interconnect Receiver function is used to collect data that is forwarded by an Interconnect Sender from another stream.
For example, consider a stream shown below containing an Interconnect Receiver, Map and Log functions. This stream collects incoming data from a stream that sends output data using an Interconnect Sender.
The name of the stream with the Interconnect Receiver must be provided in the configuration of the Interconnect Sender to connect both the two streams. You can also copy the name from the configuration of the Interconnect Receiver and paste it in the Forward data to stream option in the configuration of the Interconnect Sender.
Note!
- The Interconnect Receiver receives data in the same order in which it is processed by the Interconnect Sender.
- An Interconnect Receiver can receive output data from multiple Interconnect Senders but the Stream Interconnect feature only works if all the streams involved are part of the same Solution.
Interconnect Sender
The Interconnect Sender function is used to forward output data to be collected by an Interconnect Receiver from another stream.
For example, consider a stream shown below containing a Data Generator, Map and Interconnect Sender functions. This stream forwards output data to an Interconnect Receiver present in a different stream.
In the configuration of the Interconnect Sender, you can select the stream to which you want to forward the output data to in the Forward data to stream option. A notification is displayed after successfully connecting the streams.
Note!
When a stream consisting of the Interconnect Sender is run, you have up to 31 days for the data to be collected by a stream with an Interconnect Receiver before it is discarded.
Use Case
Stream Groups
- When configuring a Stream Group that consists of streams using the Stream Interconnect feature, the stream containing the Interconnect Sender must be configured to run prior to the stream containing the Interconnect Receiver. This is to ensure that the stream containing the Interconnect Sender is run until it is finished and then the stream containing the Interconnect Receiver is run until it is finished.
Schedule Stream
- You can also schedule your Stream Group to run the streams accordingly.