Retained messages
Inspecting the retained message store
To list the retained messages simply invoke vmq-admin retain show:
1
$ vmq-admin retain show
2
+------------------+----------------+
3
| payload | topic |
4
+------------------+----------------+
5
| a-third-message | a/third/topic |
6
|some-other-message|some/other/topic|
7
| a-message | some/topic |
8
| a-message | another/topic |
9
+------------------+----------------+
Copied!
Note, by default a maximum of 100 results are returned. This is a mechanism to protect the from overload as there can be millions of retained messages. Use --limit=<RowLimit> to override the default value.
Besides listing the retained messages it is also possible to filter them:
1
$ vmq-admin retain show --payload --topic=some/topic
2
+---------+
3
| payload |
4
+---------+
5
|a-message|
6
+---------+
Copied!
In the above example we list only the payload for the topic some/topic.
Another example where all topics are list with retained messages with a specific payload:
1
$ vmq-admin retain show --payload a-message --topic
2
+-------------+
3
| topic |
4
+-------------+
5
| some/topic |
6
|another/topic|
7
+-------------+
Copied!
See the full set of options and documentation by invoking vmq-admin retain show --help:
1
$ sudo vmq-admin retain --help
2
Usage: vmq-admin retain show
3
4
Show and filter MQTT retained messages.
5
6
Default options:
7
--payload --topic
8
9
Options
10
11
--limit=<NumberOfResults>
12
Limit the number of results returned. Defaults is 100.
13
--payload
14
--topic
15
--mountpoint
Copied!
Last modified 2mo ago
Export as PDF
Copy link
Edit on GitHub