Module ngx_stream_mqtt_preread_module

Example Configuration
Embedded Variables

The ngx_stream_mqtt_preread_module module (1.23.4) allows extracting information from the CONNECT message of the Message Queuing Telemetry Transport protocol (MQTT) versions 3.1.1 and 5.0, for example, a username or a client ID.

This module is available as part of our commercial subscription.

Example Configuration

mqtt_preread on;
return       $mqtt_preread_clientid;


Syntax: mqtt_preread on | off;
mqtt_preread off;
Context: stream, server

Enables extracting information from the MQTT CONNECT message at the preread phase.

Embedded Variables

the clientid value from the CONNECT message
the username value from the CONNECT message