MQTT

Troubleshooting

Client Cannot Connect

Check:

  • The MQTT listener port (1883 or 8883)
  • TLS configuration if using encrypted MQTT
  • Username and password
  • Virtual host permissions
  • Firewall or network connectivity

LavinMQ authenticates MQTT clients during the MQTT CONNECT phase. Authentication failures typically result in the connection being rejected with a CONNACK authorization error.


Subscribers Not Receiving Messages

Verify:

  • The published topic matches the subscription filter
  • Wildcard usage (+ and #)
  • The client is connected to the correct virtual host
  • Topic permissions allow reads and writes
  • QoS expectations match the client configuration

Internally, LavinMQ routes MQTT messages through the MQTT exchange and subscription tree, so incorrect topic filters are a common source of delivery issues.


Retained Messages Not Appearing

Verify:

  • Messages are published with the retain flag enabled
  • Retained messages were not cleared using an empty retained publish
  • The subscriber topic filter matches the retained topic

Retained messages are stored separately from normal message delivery and are sent immediately when a new subscription matches.


Ready to take the next steps?

Managed LavinMQ instance via CloudAMQP

LavinMQ has been built with performance and ease of use in mind - we've benchmarked a throughput of about 1,000,000 messages/sec . You can try LavinMQ without any installation hassle by creating a free instance on CloudAMQP. Signing up is a breeze.

Get started with CloudAMQP ->

Help and feedback

We welcome your feedback and are eager to address any questions you may have about this piece or using LavinMQ. Join our Slack channel to connect with us directly. You can also find LavinMQ on GitHub.


Can’t find what you’re looking for? Let us know
Was this helpful?

Search