cluster-computingmqtt-vernemq

How to sub to and monitor a VerneMQ cluster?


I managed to create a cluster of 2 Vernemq nodes.

Both are well communicating and are located to a different server, respectively

Following command shows both nodes running. (ssl and port 8883 are used)

vmq-admin cluster show
+-----------------------+-------+
|        Node           |Running|
+-----------------------+-------+
|ServerAMQ@10.107.1.25  | true  |
|ServerBMQ@10.107.1.26  | true  |
+-----------------------+-------+

Everything is running fine actually, eg :

mosquitto_pub -h a.mycompany.com -p 8883 -t 'topic/A/1' -m "foo" -d --cert client.crt --key client.key --cafile ca.crt -d

As i'm subbing A.mycompany.com, does the Cluster distribute to B.mycompany.com ?

Can please someone share some insight on how it works ?


As i don't have any experience on this subject, may i please ask you which is the best way to supervise cluster's activity ?

  1. Graphite (i saw some cluster's related metrics)
  2. http://(oneofthetwoserver):8888/metrics

Regards,

Pierre


Solution

  • A quick way to overview the cluster is: http://{{your_server}}:8888/status.

    For a production deployment, I'd use Prometheus metrics in any case.

    I'm not sure I get your question regarding broker A and B. If they are clustered, messages published to A will be delivered to a subscriber on broker B, provided the topic subscription matches.