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.
Last modified 2yr ago
Copy link