Abstract
Event Stream is a new feature in Ignition 8.3. It is a way to trigger data flow through the system and can function as a method of communication within and outside of Ignition. An Event Stream gets triggered from a Source which can be a Message Handler, API Endpoint, Kafka, etc. Event Stream Source forwards data into the Data Filter & Transform where user can add scripts or filters to massage and transform the data. Finally, the data goes to the Data Buffer and then gets send to the Handler which, in turn, forwards the data to its destination.

The MQTT Engine module registers two more Event Stream sources:
Both sources are fully configurable within Designer at Event Stream setup time.
Setting up MQTT Event Stream Source
This section provides an example of configuring basic Event Stream with MQTT Source.
Prerequisites
- Have Ignition 8.3.0 installed
- Install the following MQTT Modules:
- MQTT Distributor
- MQTT Engine
Setup
- Open Designer and navigate to the Project Browser.
- Select 'Event Streams' and create an event stream by specifying stream name and selecting a Source as shown below:


- Press the 'Create' button to create the MqttSourceEventStream. You should see the following Event Stream configuration:

- Configure Source by specifying Subscription Topic (default value is EventStreams/#) and QoS (default value is 0).
- Set the Encoder to 'String' as shown below:

- Setup a 'Script' Handler as shown below:

- Finally, save all outstanding project changes. At this point, the MQTT Source Event Stream should be in the 'running' state with 0 messages.

- At this point event stream is ready and can be tested with MQTT client like MQTT.fx
Testing
- Launch MQTT.fx and connect to MQTT Distributor.
- Publish the "Hello World" string on the EventStreams/test topic as shown below:

- The following message should be logged and the MQTT Source Event Stream in Designer should be updated as shown below:


Setting up Sparkplug Event Stream Source
This section provides an example of configuring basic Event Stream with Sparkplug Source.
Prerequisites
- Have Ignition 8.3.0 installed
- Install the following MQTT Modules
- MQTT Distributor
- MQTT Engine
- MQTT Transmission
Setup
- Open Designer and navigate to the Project Browser.
- Select 'Event Streams' and create an event stream by specifying stream name and selecting a Source as shown below:

- Press the 'Create' button to create the SparkplugSourceEventStream. You should see the following Event Stream configuration:

- Configure Source by specifying comma-separated list of Topic Filters (default value is spBv1.0/#).
- Keep default JsonObject encoder.
- Setup a 'Script' Handler as shown below:

- Finally, save all outstanding project changes. At this point, the Sparkplug Source Event Stream should be in the 'running' state with 0 messages.

- Configure MQTT Transmission module by setting the Default Transmitter.

- Create [default]Edge Nodes/G1/E1/D1/tag1 as shown below:

- Refresh Transmission by clicking the [MQTT Transmission]Transmission Control/Refresh
- The following message should be logged and the MQTT Source Event Stream in Designer should be updated as shown below:


- Note that Event Stream Handler logged NBIRTH and DBIRTH messages
- Now change the value of the [default]Edge Nodes/G1/E1/D1/tag1 from "Hello World" to "Test"
- At this point, the following DDATA message should be logged

- Note that we can filter out unwanted Sparkplug messages by applying less generic topic filters. For example if we want only NDATA and DDATA messages for G1/E1, we can apply two topic filters as shown below:
- spBv1.0/G1/DDATA/E1/+,spBv1.0/G1/NDATA/E1/#