Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
Loading...
$ vmq-admin api-key create
JxctXkZ1OTVnlwvguSCE9KtujacMkOLF$ vmq-admin api-key show
+--------------------------------+
| Key |
+--------------------------------+
|JxctXkZ1OTVnlwvguSCE9KtujacMkOLF|
+--------------------------------+vmq-admin api-key add key=mykeyvmq-admin api-key delete key=JxctXkZ1OTVnlwvguSCE9KtujacMkOLFcurl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/session/show"vmq-admin cluster join [email protected]GET /api/v1/cluster/[email protected]curl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/cluster/[email protected]"{
"text": "Done",
"type": "text"
}GET /api/v1/cluster/showcurl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/cluster/show"{
"type" : "table",
"table" : [
{
"Running" : true,
"Node" : "[email protected]"
}
]
}GET /api/v1/session/showcurl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/session/show"{
"type" : "table",
"table" : [
{
"user" : null,
"client_id" : "mosqsub/11690-algol",
"peer_host" : "localhost",
"pid" : "<0.551.0>",
"peer_port" : 50964
},
{
"peer_host" : "localhost",
"pid" : "<0.557.0>",
"peer_port" : 50996,
"user" : null,
"client_id" : "mosqsub/11767-algol"
}
]
}GET /api/v1/listener/showcurl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/listener/show"{
"type" : "table",
"table" : [
{
"max_conns" : 10000,
"port" : "8888",
"mountpoint" : "",
"ip" : "127.0.0.1",
"type" : "http",
"status" : "running"
},
{
"status" : "running",
"max_conns" : 10000,
"port" : "44053",
"mountpoint" : "",
"ip" : "0.0.0.0",
"type" : "vmq"
},
{
"max_conns" : 10000,
"port" : "1883",
"mountpoint" : "",
"ip" : "127.0.0.1",
"type" : "mqtt",
"status" : "running"
}
]
}GET /api/v1/plugin/showcurl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/plugin/show" {
"type" : "table",
"table" : [
{
"Hook(s)" : "auth_on_register\n",
"Plugin" : "vmq_passwd",
"M:F/A" : "vmq_passwd:auth_on_register/5\n",
"Type" : "application"
},
{
"Type" : "application",
"M:F/A" : "vmq_acl:auth_on_publish/6\nvmq_acl:auth_on_subscribe/3\n",
"Plugin" : "vmq_acl",
"Hook(s)" : "auth_on_publish\nauth_on_subscribe\n"
}
]
}GET /api/v1/set?allow_publish_during_netsplit=oncurl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/set?allow_publish_during_netsplit=on"[]GET /api/v1/session/disconnect?client-id=myclient&--cleanupcurl "http://JxctXkZ1OTVnlwvguSCE9KtujacMkOLF@localhost:8888/api/v1/session/disconnect?client-id=myclient&--cleanup"[]vmq-admin trace client client-id=<client-id>$ vmq-admin trace client client-id=client
No sessions found for client "client"
New session with PID <7616.3443.1> found for client "client"
<7616.3443.1> MQTT RECV: CID: "client" CONNECT(c: client, v: 4, u: username, p: password, cs: 1, ka: 30)
<7616.3443.1> Calling auth_on_register({{172,17,0,1},34274},{[],<<"client">>},username,password,true)
<7616.3443.1> Hook returned "ok"
<7616.3443.1> MQTT SEND: CID: "client" CONNACK(sp: 0, rc: 0)
<7616.3443.1> MQTT RECV: CID: "client" SUBSCRIBE(m1) with topics:
q:0, t: "topic"
<7616.3443.1> Calling auth_on_subscribe(username,{[],<<"client">>}) with topics:
q:0, t: "topic"
<7616.3443.1> Hook returned "ok"
<7616.3443.1> MQTT SEND: CID: "client" SUBACK(m1, qt[0])
<7616.3443.1> Trace session for client stoppedHow to implement VerneMQ plugins using a HTTP interface
plugins.vmq_webhooks = onvmq_webhooks.mywebhook1.hook = auth_on_register
vmq_webhooks.mywebhook1.endpoint = http://127.0.0.1/myendpoints$ vmq-admin webhooks register hook=auth_on_register endpoint="http://localhost"$ vmq-admin webhooks show$ vmq-admin webhooks deregister hook=auth_on_register endpoint="http://localhost"$ vmq-admin webhooks cache show{
"peer_addr": "127.0.0.1",
"peer_port": 8888,
"username": "username",
"password": "password",
"mountpoint": "",
"client_id": "clientid",
"clean_session": false
}{
"result": "ok"
}{
"result": "ok",
"modifiers": {
"max_message_size": 65535,
"max_inflight_messages": 10000,
"retry_interval": 20000
}
}{
"result": "next"
}{
"result": {
"error": "not_allowed"
}
}{
"client_id": "clientid",
"mountpoint": "",
"username": "username",
"topics":
[{"topic": "a/b",
"qos": 1},
{"topic": "c/d",
"qos": 2}]
}{
"result": "ok"
}{
"result": "ok",
"topics":
[{"topic": "rewritten/topic",
"qos": 0}]
}{
"result": "next"
}{
"result": { "error": "some error message" }
}{
"username": "username",
"client_id": "clientid",
"mountpoint": "",
"qos": 1,
"topic": "a/b",
"payload": "hello",
"retain": false
}{
"result": "ok"
}{
"result": "ok",
"modifiers": {
"topic": "rewritten/topic",
"qos": 2,
"payload": "rewritten payload",
"retain": true
}
}{
"result": "next"
}{
"result": { "error": "some error message" }
}{
"peer_addr": "127.0.0.1",
"peer_port": 8888,
"username": "username",
"mountpoint": "",
"client_id": "clientid"
}{
"username": "username",
"client_id": "clientid",
"mountpoint": "",
"qos": 1,
"topic": "a/b",
"payload": "hello",
"retain": false
}{
"client_id": "clientid",
"mountpoint": "",
"username": "username",
"topics":
[{"topic": "a/b",
"qos": 1},
{"topic": "c/d",
"qos": 2}]
}{
"username": "username",
"client_id": "clientid",
"mountpoint": "",
"topics":
["a/b", "c/d"]
}{
"result": "ok",
"topics":
["rewritten/topic"]
}{
"result": "next"
}{
"result": { "error": "some error message" }
}{
"username": "username",
"client_id": "clientid",
"mountpoint": "",
"topic": "a/b",
"payload": "hello"
}{
"result": "ok",
"modifiers":
{
"topic": "rewritten/topic",
"payload": "rewritten payload"
}
}{
"result": "next"
}{
"client_id": "clientid",
"mountpoint": "",
"qos": "1",
"topic": "sometopic",
"payload": "payload",
"retain": false
}{
"client_id": "clientid",
"mountpoint": ""
}{
"client_id": "clientid",
"mountpoint": ""
}{
"client_id": "clientid",
"mountpoint": ""
}{
"peer_addr": "127.0.0.1",
"peer_port": 8888,
"mountpoint": "",
"client_id": "client-id",
"username": "username",
"password": "password",
"clean_start": true,
"properties": {}
}{
"result": "ok"
}{
"result": "ok",
"modifiers": {
"max_message_size": 65535,
"max_inflight_messages": 10000
}
}{
"result": "next"
}{
"result": {
"error": "not_allowed"
}
}{
"username": "username",
"mountpoint": "",
"client_id": "client-id",
"properties": {
"p_authentication_data": "QVVUSF9EQVRBMA==",
"p_authentication_method": "AUTH_METHOD"
}
} "modifiers": {
"properties": {
"p_authentication_data": "QVVUSF9EQVRBMQ==",
"p_authentication_method": "AUTH_METHOD"
}
"reason_code": 0
},
"result": "ok"
}{
"username": "username",
"mountpoint": "",
"client_id": "client-id",
"topics": [
{
"topic": "test/topic",
"qos": 1
}
],
"properties": {}
}{
"result": "ok"
}{
"modifiers": {
"topics": [
{
"qos": 2,
"topic": "rewritten/topic"
},
{
"qos": 135,
"topic": "forbidden/topic"
}
]
},
"result": "ok"
}{
"result": "next"
}{
"result": {
"error": "not_allowed"
}
}{
"username": "username",
"mountpoint": "",
"client_id": "client-id",
"qos": 1,
"topic": "some/topic",
"payload": "message payload",
"retain": false,
"properties": {
}
}{
"result": "ok"
}{
"modifiers": {
"topic": "rewritten/topic"
},
"result": "ok"
}{
"result": "next"
}{
"result": {
"error": "not_allowed"
}
}{
"peer_addr": "127.0.0.1",
"peer_port": 8888,
"mountpoint": "",
"client_id": "client-id",
"username": "username",
"properties": {
}
}{
"username": "username",
"mountpoint": "",
"client_id": "client-id",
"qos": 1,
"topic": "test/topic",
"payload": "message payload",
"retain": false,
"properties": {
}
}{
"username": "username",
"mountpoint": "",
"client_id": "client-id",
"topics": [
{
"topic": "test/topic",
"qos": 1
},
{
"topic": "test/topic",
"qos": 128
}
],
"properties": {
}
}{
"username": "username",
"mountpoint": "",
"client_id": "client-id",
"topics": [
"test/topic"
],
"properties": {
}
}{
"modifiers": {
"topics": [
"rewritten/topic"
]
},
"result": "ok"
}{
"result": "next"
}{
"username": "username",
"mountpoint": "",
"client_id": "client-id",
"topic": "test/topic",
"payload": "message payload",
"properties": {
}
}{
"result": "ok"
}{
"result": "next"
}import web
import json
urls = ('/.*', 'hooks')
app = web.application(urls, globals())
class hooks:
def POST(self):
# fetch hook and request data
hook = web.ctx.env.get('HTTP_VERNEMQ_HOOK')
data = json.loads(web.data())
# print the hook and request data to the console
print
print 'hook:', hook
print ' data: ', data
# dispatch to appropriate function based on the hook.
if hook == 'auth_on_register':
return handle_auth_on_register(data)
elif hook == 'auth_on_publish':
return handle_auth_on_publish(data)
elif hook == 'auth_on_subscribe':
return handle_auth_on_subscribe(data)
else:
web.ctx.status = 501
return "not implemented"
def handle_auth_on_register(data):
# only allow user 'joe' with password 'secret', reject all others.
if "joe" == data['username']:
if "secret" == data['password']:
return json.dumps({'result': 'ok'})
return json.dumps({'result': {'error': 'not allowed'}})
def handle_auth_on_publish(data):
# accept all publish requests
return json.dumps({'result': 'ok'})
def handle_auth_on_subscribe(data):
# accept all subscribe requests
return json.dumps({'result': 'ok'})
if __name__ == '__main__':
app.run()As well as being available as packages that can be installed directly into the operating systems, VerneMQ is also available as a Docker image. Below is an example of how to set up a couple of VerneMQ
docker run -e "DOCKER_VERNEMQ_DISCOVERY_NODE=<IP-OF-VERNEMQ1>" --name vernemq2 -d erlio/docker-vernemqsudo yum install vernemq-<VERSION>.centos7.x86_64.rpmdocker exec vernemq1 vmq-admin cluster show
+--------------------+-------+
| Node |Running|
+--------------------+-------+
|[email protected]| true |
|[email protected]| true |
+--------------------+-------+retry_interval = 20max_inflight_messages = 20max_online_messages = 1000max_offline_messages = 1000vernemq startvernemq consoleq().vernemq pingsudo rpm -Uvh vernemq-<VERSION>.centos7.x86_64.rpmservice vernemq startrpm -qa | grep vernemqlistener.ws.default = 127.0.0.1:9001
listener.wss.default = 127.0.0.1:9002dpkg -s vernemq | grep Statusservice vernemq startwhereis vernemq
vernemq: /usr/sbin/vernemq /usr/lib/vernemq /etc/vernemq /usr/share/vernemqThe VerneMQ status page
Inspecting the retained message store
How to setup and configure the HTTP listener.
Description and Configuration of the built-in Monitoring mechanism
The VerneMQ health checker
allow_multiple_sessions = on
queue_deliver_mode = balancegraphite_enabled = on
graphite_host = carbon.hostedgraphite.com
graphite_port = 2003
graphite_interval = 20000
graphite_api_key = YOUR-GRAPHITE-API-KEY# set the connect timeout (defaults to 5000 ms)
graphite_connect_timeout = 10000
# set a reconnect timeout (default to 15000 ms)
graphite_reconnect_timeout = 10000
# set a custom graphite prefix (defaults to '')
graphite_prefix = vernemqrebar3 new app name="myplugin" desc="this is my first VerneMQ plugin"
===> Writing myplugin/src/myplugin_app.erl
===> Writing myplugin/src/myplugin_sup.erl
===> Writing myplugin/src/myplugin.app.src
===> Writing myplugin/rebar.config
===> Writing myplugin/.gitignore
===> Writing myplugin/LICENSE
===> Writing myplugin/README.md{erl_opts, [debug_info]}.
{deps, [{vernemq_dev,
{git, "git://github.com/vernemq/vernemq_dev.git", {branch, "master"}}}
]}.some/topic.$ vmq-admin retain show
+------------------+----------------+
| payload | topic |
+------------------+----------------+
| a-third-message | a/third/topic |
|some-other-message|some/other/topic|
| a-message | some/topic |
| a-message | another/topic |
+------------------+----------------+$ vmq-admin retain show --payload --topic=some/topic
+---------+
| payload |
+---------+
|a-message|
+---------+listener.http.default = 127.0.0.1:8888return_codereason_codevmq-admin metrics showvmq-admin metrics show -d--path=PathToPluginvmq-admin plugin show20000systree_interval = 20000systree_enabled = off# A scrape configuration containing exactly one endpoint to scrape:
# Here it's Prometheus itself.
scrape_configs:
- job_name: 'vernemq'
scrape_interval: 5s
scrape_timeout: 5s
static_configs:
- targets: ['localhost:8888']rebar3 compile
===> Verifying dependencies...
===> Fetching vmq_commons ({git,
"git://github.com/vernemq/vernemq_dev.git",
{branch,"master"}})
===> Compiling vernemq_dev
===> Compiling mypluginvmq-admin listener show +----+-------+------------+-----+----------+---------+
|type|status | ip |port |mountpoint|max_conns|
+----+-------+------------+-----+----------+---------+
|vmq |running|192.168.1.50|44053| | 30000 |
|mqtt|running|192.168.1.50|1883 | | 30000 |
+----+-------+------------+-----+----------+---------+
`vmq-admin listener start address=192.168.1.50 port=1884 --mountpoint /test --nr_of_acceptors=10 --max_connections=1000vmq-admin listener stop address=192.168.1.50 port=1884vmq-admin listener restart address=192.168.1.50 port=1884vmq-admin listener delete address=192.168.1.50 port=1884$ vmq-admin retain show --payload a-message --topic
+-------------+
| topic |
+-------------+
| some/topic |
|another/topic|
+-------------+max_client_id_size = 23persistent_client_expiration = 1wmax_message_size = 0# The number of AUTH packets received.
counter.mqtt_auth_received = 0
# The number of times a MQTT queue process has been initialized from offline storage.
counter.queue_initialized_from_storage = 0
# The number of PUBLISH packets sent.
counter.mqtt_publish_sent = 10
# The number of bytes used for storing retained messages.
gauge.retain_memory = 21184mqtt_connack_not_authorized_sent
mqtt_connack_bad_credentials_sent
mqtt_connack_server_unavailable_sent
mqtt_connack_identifier_rejected_sent
mqtt_connack_unacceptable_protocol_sent
mqtt_connack_accepted_sentvmq-admin metrics show --return_code=not_authorized
counter.mqtt_connack_sent = 0+-----------+-----------+-----------------+-----------------------------+
| Plugin | Type | Hook(s) | M:F/A |
+-----------+-----------+-----------------+-----------------------------+
|vmq_passwd |application|auth_on_register |vmq_passwd:auth_on_register/5|
| vmq_acl |application| auth_on_publish | vmq_acl:auth_on_publish/6 |
| | |auth_on_subscribe| vmq_acl:auth_on_subscribe/3 |
+-----------+-----------+-----------------+-----------------------------+vmq-admin plugin enable --name=vmq_aclvmq-admin plugin disable --name=vmq_aclplugins.vmq_passwd = onplugins.myplugin = on
plugins.myplugin.path = /path/to/pluginvmq_passwd.password_file = ./etc/vmq.passwdmosquitto_sub -t '$SYS/<node-name>/#' -u <username> -P <password> -dauth_on_subscribeauth_on_subscribe_m5auth_on_subscribeauth_on_subscribe hook in the This describes a quick way to create a VerneMQ cluster on developer's machines
queue_deliver_mode = balancequeue_type = fifomax_message_rate = 2max_drain_time = 20max_msgs_per_drain_step = 1000vmq_reg_view = "vmq_reg_trie"reg_views = "[vmq_reg_trie]"outgoing_clustering_buffer_size = 15000log.console.level = debug | info | warning | errorlog.error = on | offlog.error.file = /path/to/log/filelog.crash = on | offlog.crash.file = /path/to/log/filelog.crash.maximum_message_size = 64KB## Acceptable values:
## - a byte size with units, e.g. 10GB
log.crash.size = 10MB
## For acceptable values see https://github.com/basho/lager/blob/master/README.md#internal-log-rotation
log.crash.rotation = $D0log.crash.rotation.keep = 5log.syslog = onplugins.vmq_passwd = offallow_anonymous = onvmq_passwd.password_file = /etc/vernemq/vmq.passwdvmq_passwd.password_reload_interval = 10vmq-passwd [-c | -D] passwordfile username
vmq-passwd -U passwordfilevmq-passwd -c /etc/vernemq/vmq.passwd henryvmq-passwd -D /etc/vernemq/vmq.passwd henryplugins.vmq_acl = offvmq_acl.acl_file = /etc/vernemq/vmq.aclvmq_acl.acl_reload_interval = 10topic [read|write] <topic>user <username>pattern [read|write] <topic>pattern write sensor/%u/data# ACL for anonymous clients
topic bar
topic write foo
topic read all
# ACL for user 'john'
user john
topic foo
topic read baz
topic write allgit clone git://github.com/erlio/vmq_mzbench.git
cd vmq_mzbench
./rebar get-deps
./rebar compile{make_install, [
{rsync, "/path/to/your/installation/vmq_mzbench/"},
{exclude, "deps"}]},{make_install, [
{git, "git://github.com/erlio/vmq_mzbench.git"}]},➜ default git:(master) ✗ make dev1 dev2 dev3shared_subscription_policy = prefer_localmosquitto_sub -h mqtt.example.io -p 1883 -q 2 -t \$share/group/topicname
mosquitto_sub -h mqtt.example.io -p 1883 -q 2 -t \$share/group/topicname/#mosquitto_pub -h mqtt.example.io -p 1883 -t topicname -m "This is a test message"
mosquitto_pub -h mqtt.example.io -p 1883 -t topicname/group1 -m "This is a test message"VerneMQ supports multiple ways to configure one or many MQTT listeners.
# defines the default nr of allowed concurrent
# connections per listener
listener.max_connections = 10000
# defines the nr. of acceptor processes waiting
# to concurrently accept new connections
listener.nr_of_acceptors = 10
# used when clients of a particular listener should
# be isolated from clients connected to another
# listener.
listener.mountpoint = offInspecting and managing MQTT sessions
$ vmq-admin session show
+---------+---------+----------+---------+---------+---------+
|client_id|is_online|mountpoint|peer_host|peer_port| user |
+---------+---------+----------+---------+---------+---------+
| client2 | true | |127.0.0.1| 37098 |undefined|
| client1 | true | |127.0.0.1| 37094 |undefined|
+---------+---------+----------+---------+---------+---------+
erlang.distribution.port_range.minimum = 6000
erlang.distribution.port_range.maximum = 7999listener.vmq.clustering = 0.0.0.0:44053vmq-admin cluster join discovery-node=<OtherClusterNode>vmq-admin cluster leave node=<NodeThatShouldGo> (only the first step!)vmq-admin cluster showlistener.ssl.mountpoint = ssl-mountpoint
listener.tcp.listener1.mountpoint = tcp-listener1
listener.tcp.listener2.mountpoint = tcp-listener2listener.tcp.allowed_protocol_versions = 3,4,5listener.tcp.default = 127.0.0.1:1883
listener.ws.default = 127.0.0.1:8888listener.tcp.my_other = 127.0.0.1:18884
listener.tcp.my_other.max_connections = 100listener.ssl.cafile = /etc/ssl/cacerts.pem
listener.ssl.certfile = /etc/ssl/cert.pem
listener.ssl.keyfile = /etc/ssl/key.pem
listener.ssl.default = 127.0.0.1:8883listener.ssl.require_certificate = onlistener.ssl.use_identity_as_username = on$ vmq-admin session show --node --is_online --client_id=client1
+---------+--------------+
|is_online| node |
+---------+--------------+
| true |[email protected]|
+---------+--------------+$ vmq-admin session show --topic --client_id
+---------+----------------+
|client_id| topic |
+---------+----------------+
| client2 |some/other/topic|
| client1 |some/other/topic|
| client1 | some/topic |
+---------+----------------+$ vmq-admin session show --topic --client_id --topic=some/topic
+---------+----------+
|client_id| topic |
+---------+----------+
| client1 |some/topic|
+---------+----------+$ vmq-admin session show --client_id=client1 --queue_started_at --session_started_at
+----------------+------------------+
|queue_started_at|session_started_at|
+----------------+------------------+
| 1549379963575 | 1549379974905 |
+----------------+------------------+$ vmq-admin session disconnect client-id=client1 --cleanup$ vmq-admin session reauthorize username=username client-id=client1
Unchangedplugins.vmq_bridge = on$ vmq-admin bridge show
+-----------------+-----------+----------+-------------------+
| endpoint |buffer size|buffer max|buffer dropped msgs|
+-----------------+-----------+----------+-------------------+
|192.168.1.10:1883| 0 | 0 | 0 |
+-----------------+-----------+----------+-------------------+vmq_bridge.tcp.br0 = 192.168.1.12:1883# use a clean session (defaults to 'off')
vmq_bridge.tcp.br0.cleansession = off | on
# set the client id (defaults to 'auto', which generates one)
vmq_bridge.tcp.br0.client_id = auto | my_bridge_client_id
# set keepalive interval (defaults to 60 seconds)
vmq_bridge.tcp.br0.keepalive_interval = 60
# set the username and password for the bridge connection
vmq_bridge.tcp.br0.username = my_bridge_user
vmq_bridge.tcp.br0.password = my_bridge_pwd
# set the restart timeout (defaults to 10 seconds)
vmq_bridge.tcp.br0.restart_timeout = 10
# VerneMQ indicates other brokers that the connection
# is established by a bridge instead of a normal client.
# This can be turned off if needed:
vmq_bridge.tcp.br0.try_private = off
# Set the maximum number of outgoing messages the bridge will buffer
# while not connected to the remote broker. Messages published while
# the buffer is full are dropped. A value of 0 means buffering is
# disabled.
vmq_bridge.tcp.br0.max_outgoing_buffered_messages = 100topic [[[ out | in | both ] qos-level] local-prefix remote-prefix]# share messages in both directions and use QoS 1
vmq_bridge.tcp.br0.topic.1 = /demo/+ both 1
# import the $SYS tree of the remote broker and
# prefix it with the string 'remote'
vmq_bridge.tcp.br0.topic.2 = $SYS/* in remote# define the CA certificate file or the path to the
# installed CA certificates
vmq_bridge.ssl.br0.cafile = cafile.crt
#or
vmq_bridge.ssl.br0.capath = /path/to/cacerts
# if the remote broker requires client certificate authentication
vmq_bridge.ssl.br0.certfile = /path/to/certfile.pem
# and the keyfile
vmq_bridge.ssl.br0.keyfile = /path/to/keyfile
# disable the verification of the remote certificate (defaults to 'off')
vmq_bridge.ssl.br0.insecure = off
# set the used tls version (defaults to 'tlsv1.2')
vmq_bridge.ssl.br0.tls_version = tlsv1.2allow_anonymous
topic_alias_max_broker
receive_max_broker
vmq_acl.acl_file
graphite_host
vmq_acl.acl_reload_interval
graphite_enabled
queue_type
suppress_lwt_on_session_takeover
max_message_size
vmq_passwd.password_file
graphite_port
max_client_id_size
upgrade_outgoing_qos
max_message_rate
graphite_interval
allow_multiple_sessions
systree_enabled
max_last_will_delay
retry_interval
receive_max_client
max_offline_messages
max_online_messages
max_inflight_messages
allow_register_during_netsplit
vmq_passwd.password_reload_interval
topic_alias_max_client
systree_interval
allow_publish_during_netsplit
coordinate_registrations
remote_enqueue_timeout
persistent_client_expiration
allow_unsubscribe_during_netsplit
graphite_include_labels
shared_subscription_policy
queue_deliver_mode
allow_subscribe_during_netsplitvmq-admin set max_client_id_size=45vmq-admin set max_client_id_size=45 [email protected]vmq-admin set max_client_id_size=45 --allvmq-admin show max_client_id_size retry_interval+----------------------+------------------+--------------+
| node |max_client_id_size|retry_interval|
+----------------------+------------------+--------------+
|[email protected]| 28 | 20 |
+----------------------+------------------+--------------+
`vmq-admin show max_client_id_size retry_interval --node [email protected]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 |
+----------------------+------------------+--------------+{application, vmq_acl,
[
{description, "Simple File based ACL for VerneMQ"},
{vsn, git},
{registered, []},
{applications, [
kernel,
stdlib,
clique
]},
{mod, { vmq_acl_app, []}},
{env, [
{file, "priv/test.acl"},
{interval, 10},
{vmq_config_enabled, true},
{vmq_plugin_hooks, [
{vmq_acl, change_config, 1, [internal]},
{vmq_acl, auth_on_publish, 6, []},
{vmq_acl, auth_on_subscribe, 3, []}
]}
]}
]}.-type peer() :: {inet:ip_address(), inet:port_number()}.
-type username() :: binary() | undefined.
-type password() :: binary() | undefined.
-type client_id() :: binary().
-type mountpoint() :: string().
-type subscriber_id() :: {mountpoint(), client_id()}.
-type reg_view() :: atom().
-type topic() :: [binary()].
-type qos() :: 0 | 1 | 2.
-type routing_key() :: [binary()].
-type payload() :: binary().
-type flag() :: boolean().