(SOLVED) Connection and Publishing issues

Hi,

I am working on a POC for a customer and I am using your Cloud MQTT broker (Basic) for evaluation.

My setup:

  1. Hw device based on Arduino Nano 33 IoT with this MQTT Library: https://github.com/256dpi/arduino-mqtt wich publish some topics and subscribe to others.

  2. iOS / macOS custom application with this MQTT Library: https://github.com/emqx/CocoaMQTT.git

  3. MQTT.fx and other applications for manual publishing and to check the problems are not related to my own code

Everything works as expected using a local mosquitto broker (even with SSL and a server self signed certificate) and other cloud brokers.

Conversely, I am experiencing various issues with HiveMQ broker:

  1. Sometimes the device gets connected and stay connected. Sometimes it gets diconnected continuously with the library reporting “missing or wrong packet” error

  2. The custom application can connect only via websocket (Port 8884). Trying to connect to the Port 8883 the library reports this error “Socket closed by remote peer”

  3. I cannot use the mosquitto client to publish:

mosquitto_pub -h -p 8883 -u -P -t fab64/feeds/LED -m 0 -d

because I always get “Error: The connection was lost”. I copyed the command from the getting started page.

  1. Independently from the client and QoS used, sometimes the publishing works fine, sometimes it stops after the first published message on any topic (other clients receive only the first value and then nothing).
    Sometimes they receive the messages only when the publishing client disconnects.
    In most case using QoS = 1 or 2 the MQTT.fx gets stuck and I have to kill it.

  2. Independently from the client and QoS used, some topics are published correctly ather are not.

I tryed to destroy the cluster and recreate it (both on WS and Azure) but apparently nothing chages.

What can I do to overcome these issues to make my POC working properly?

Thank you in advance.

what version of mosquitto do you use?
With earlier versions I did experience the same.
Since mosquitto 2.x I never witnessed it again.
Just a simple guess / question for the versions used.

Hi @fab64,

Thank you for reaching out and your patience.
The cause for the behaviour your described has been resolved.
You can use HiveMQ Cloud Basic for your PoC again.

Best,
Florian

Hi Florian,

Thank you for your support.

After a quick test:

  • Issue #1: Solved. (Note: Client ID cannot be an empty string otherwise the device cannot get connected)
  • Issue #2: Not solved. My custom app get connected only via WebSocket. I think my code and the library are fine because they work fine on port 8883 and other brokers
  • Issue #3: Not solved.
  • Issue #4 and #5: Solved.