Setting VerneMQ config values dynamically

You can dynamically re-configure most of VerneMQ's settings on a running node by using the vmq-admin set command.

Setting a value for the local node

Let's change the max_client_id_size as an example. (We might have noticed that some clients can't login because their client ID is too long, but we don't want to restart the broker for that). Note that you can also set multiple values with the same command.

vmq-admin set max_client_id_size=45

Setting a value for an arbitrary cluster node

vmq-admin set max_client_id_size=45 [email protected]

Setting a value for all cluster nodes

vmq-admin set max_client_id_size=45 --all

Show current VerneMQ config values

For the local node

You can show one or multiple values in a simple table:

vmq-admin show max_client_id_size retry_interval
+----------------------+------------------+--------------+
|         node         |max_client_id_size|retry_interval|
+----------------------+------------------+--------------+
|[email protected]|        28        |      20      |
+----------------------+------------------+--------------+

For an arbitrary node

vmq-admin show max_client_id_size retry_interval --node [email protected]

For all cluster nodes

vmq-admin show max_client_id_size retry_interval --all
+----------------------+------------------+--------------+
|         node         |max_client_id_size|retry_interval|
+----------------------+------------------+--------------+
|[email protected]|        33        |      20      |
|[email protected]|        33        |      20      |
|[email protected]|        33        |      20      |
|[email protected]|        33        |      20      |
|[email protected]|        28        |      20      |
+----------------------+------------------+--------------+