blob: 40522c2dc5c5578ab644df99e5f734852aa65a18 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
=encoding utf-8
=head1 NAME
ngx_stream_mqtt_preread_module - Module ngx_stream_mqtt_preread_module
=head1
The C<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
L<3.1.1|https://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html>
and
L<5.0|https://docs.oasis-open.org/mqtt/mqtt/v5.0/mqtt-v5.0.html>,
for example, a username or a client ID.
B<NOTE>
This module is available as part of our
commercial subscription.
=head1 Example Configuration
mqtt_preread on;
return $mqtt_preread_clientid;
=head1 Directives
=head2 mqtt_preread
B<syntax:> mqtt_preread I<C<on> E<verbar> C<off>>
B<default:> I<off>
B<context:> I<stream>
B<context:> I<server>
Enables extracting information from the MQTT CONNECT message at
the L<preread|stream_processing> phase.
=head1 Embedded Variables
=over
=item C<$mqtt_preread_clientid>
the C<clientid> value from the CONNECT message
=item C<$mqtt_preread_username>
the C<username> value from the CONNECT message
=back
|