title
VerneMQ

Trace the origin of MQTT messages in VerneMQ

This troubleshooting guide is designed to help you trace the origin of strange MQTT messages in VerneMQ. It provides step-by-step instructions for identifying the source of unexpected messages, allowing you to quickly resolve any issues and ensure that your messaging system is running smoothly.

⚠️
Please note that VerneMQ is not supported anymore in the United Manufacturing Hub and that we replaced it with HiveMQ. See also our blog article for the reasons.

If you're experiencing issues with mysterious MQTT messages appearing in your system, it can be challenging to pinpoint the source of the problem. This guide will provide you with a simple and effective solution to help you troubleshoot any issues with MQTT messages in VerneMQ.

Step 1: Connect to the VerneMQ pod

To begin troubleshooting, connect to the VerneMQ pod where the MQTT messages are originating. Once you're connected, you can use the following command to display a list of all connected clients:

vmq-admin session show

This command will show you a list of all clients connected to the VerneMQ broker, including any clients that may be causing issues.

Step 2: Trace a Single Client

Once you've identified the client or clients that may be causing issues, you can use the following command to trace their communications:

vmq-admin trace client client-id=<client-id>

Replace "<client-id>" with the ID of the client you want to trace. This command will print all communications from the specified client, allowing you to identify any unusual or unexpected messages.

Step 3: Analyze the Results

After running the trace command, you'll be able to see all communications from the specified client. This can help you identify any unexpected or unusual messages that may be causing issues. Once you've identified any problematic messages, you can take steps to resolve the issue and ensure that your messaging system is running smoothly.

Stay up-to-date

Subscribe to the UMH Learning Hub Newsletter to receive the latest updates and gain early access to our blog posts.

Subscribe