Contents
When a StreamBase Server process starts up, an EventFlow container named system
is always included. There are several system
streams within the server, as listed in The System Container. You can see the streams in a running fragment by issuing an sbc list command.
This page discusses features of the control
stream in the system
container.
Container connections to the control stream from customer-written management modules should use the default asynchronous connection type. Synchronous connections to the control stream are not prevented, but produce a warning message instead of an error.
Caution
Synchronous connections to the system.control
stream can hamper the functioning of the system container or of the StreamBase server itself.
Tuples are emitted from the control stream's output port in response to certain system-level events. These tuples have the following schema:
Field | Type |
---|---|
subsystem | string |
id | int |
param0 | string |
param1 | string |
param2 | string |
The use and meanings of fields in the control stream schema differs according to which control stream subsystem sent the tuple. The subsystems are: HA, CONTAINER, and Heartbeat.
The control stream schema for the HA subsystem is deprecated. Migrate your legacy applications to use the high availability services of the StreamBase Runtime.
The control stream schema has the following meanings for tuples emitted from the CONTAINER subsystem:
Field | Type | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
subsystem | string | String literal CONTAINER |
||||||||
id | int |
Contains one of:
|
||||||||
param0 | string |
Contains the name of the container whose start or stop event is being reported. |
||||||||
param1 | string | Contains one of STARTING , START , STOPPING , or STOPPED . The meanings of these event states are described in more detail in The Container Subsystem below.
|
||||||||
param2 | string | Not currently used. |
The control stream schema has the following meanings for tuples emitted from the Heartbeat subsystem:
Field | Type | Description |
---|---|---|
subsystem | string | String literal heartbeat |
id | int |
Contains the heartbeat period in seconds. |
param0 | string |
Contains the number of seconds in the current heartbeat event, converted to a string. |
param1 | string | Not currently used. |
param2 | string | Not currently used. |
The CONTAINER subsystem of the system
container's control
stream sends the event tuples described in the following table:
id Field | Param1 Field | Description |
---|---|---|
-100 | STARTING |
A request to start the specified container has been received by the Server, but the container has not completed startup. While the STARTING tuple is sent on the control stream, the container being added does not see this tuple, as it has not yet finished starting. Instead, the STARTING tuple is seen by other containers. For example, add container X with a container connection to the |
0 | START | The specified container has completed startup. |
100 | STOPPING | A request to stop the specified container has been received by the Server, but the container has not completed stopping. |
200 | STOPPED | The specified container has successfully stopped. |
If the specified container is removed and re-added, another pair of event tuples are sent.
Note
The container START event is not guaranteed to be the first event processed by applications being started in the newly added container. In most cases, it is the first event, but not all cases.