Skip to main content
Version: Mosquitto 3.0

Manage Streams in the Cedalo Platform UI

Navigate to the broker, where you want to manage the stream definitions. Then select Streams from the navigation. If the entry is not available, your license or setup does not allow to use streams. Either update your license or modify your configuration to enable streams.

Streams Overview

The streams overview shows the list of defined streams and details like the name, description, source topic and target topic. You can also modify the status of the stream and execute actions as described below:

The following states can be directly changed:

  • Process: Process query as defined or disable processing.
  • Persist: Persist stream message to disk for replay or not
  • Active: If active, stream is enabled, otherwise it will not execute

In the actions columns, you have the following options, when you are not in edit mode:

The following actions are available:

Only available, if stream persists. Replay a stream. This is described below.
Only available, if stream persists. Clears out all persisted streaming data.
To edit the properties of the stream.
To delete the stream.

Create Stream

To create a stream, click on the "Add Stream" Button on the top right. After that a stream is added to the stream table in the top row.

Here, the following properties can be edited:

  • Name: Name of the stream.
  • Description: Description of the stream.
  • Source topic: The topic to be processed with this stream.
  • Target topic: The topic to forward the processed data to.

Enter your changes and confirm your settings using the Save button.

Edit Stream Details

To edit the stream select definition and additional properties, click on the arrow at the beginning of the row. Now you a new section opens and you can edit:

  • Stream Query: Field to specify the stream query. Leave empty to simply create a stream rerouting from source topic to target topic. The stream processing feature allows messages with JSON payloads to be modified before they are republished and/or persisted to disk. This is managed with a user defined query that has similar concepts to a SQL statement. To better understand the syntax of stream queries see the Streams Syntax.
  • Target QoS: Quality of service of the target topic.
  • TTL: Time to live for persisted stream data.

Please not, that you have to save your changes by clicking on "Save Changes" at the bottom of the detail panel. If not, the changes will be lost.

Clicking on "Insert Stream Template" will insert a default query definition with the available fields. You can then simply enter your desired values into the template and remove not needed keys to create your query.

Modifying a stream.

Click on the "Edit" button in to change the properties, which are explained above. Modify the property column, you would like to change by clicking on it and entering new data.

If you are in edit mode, you have the following options:

To save your changes to the stream properties.
To cancel your changes to the stream properties.

Replay Stream

Replaying a stream means republishing its messages on a different topic. A single replay may be running for each stream at once. Replaying is only possible, if "persistence" is turned on. A dialog will open, where you can set the parameters for replay:

  • Replay topic: The topic to play the replay to.
  • gte/lte: Optional. Use a UTC timestamp to specify a time interval of the replay. "gte" = Greater than or equal. " lte" = Less than or equal.
  • Limit: Optional. Limit the number of messages replayed. This number represents a maximum value and may not be reached if there are not enough messages persisted. A value of -1, the default, means that no numerical limit will be applied.
  • Speed: Optional. Change the speed at which the messages are replayed. This can be one of the strings "original" or "fastest", or a number indicating the factor. For example, a speed of 2.5 means replay at 2.5x the original speed.
  • Reverse: If active, the message stream will be replayed in reverse.

After entering the parameters, click on "Replay" to start the process.

Time to Live (TTL)

When creating a new stream and enabling persistence, the Time to Live (TTL) property will be used, which allows the disk usage of streams to be limited. Setting TTL to 0 means that all messages received will be kept on disk forever, unless they are manually cleared. Setting TTL to a positive integer means that messages will be removed from the persistence store in the future. TTL is measured in seconds, and guarantees that messages that are younger than that number of seconds will be kept in the database. Messages older than the TTL interval are not immediately removed from the database: they can remain in the database until at most twice the TTL interval before they are removed, depending on when they were received.