Skip to content


MQTT messages for the same topic can be viewed as a data stream, and this data stream can be stored and queried. For some poor network environment, it provides a solution for the integrity and reliability of data.

In this chapter, we will focus on how to enable MQTT streams through configuration files and how to use Consumers to query persistent data.

Enable the MQTT STREAM through the configuration file

In this section, we will describe how to enable MQTT streams by configuring the nanomq.conf configuration file.

Try using a consumer to query persisted data

In this section, we'll show you how to use a consumer to query persistent data, and we'll show you a demo.