A 'listener' console was setup:
mosquitto_sub -h test.mosquitto.org -t "myTopic" -v
mosquitto_pub returns an error:
pi@raspberrypi:~ $ mosquitto_pub -h test.mosquitto.org -t 'myTopic' -m 'hello world'
**Error: The connection was lost.**
What steps, from the command line, can be taken to diagnose if there is a syntax problem?
Update:
Replacing the MQTT server with iot.eclipse.org does not suffer the error and returns payloads as expected.
Listener console setup:
mosquitto_sub -h iot.eclipse.org -t "myTopic" -v
Send payload:
mosquitto_pub -h iot.eclipse.org -t 'myTopic' -m 'hello world'
mosquitto_pub returns:
pi@raspberrypi:~ $ mosquitto_sub -h iot.eclipse.org -t "myTopic" -v
myTopic hello world
Publish a payload:
pi@raspberrypi:~ $ mosquitto_pub -h test.mosquitto.org -t 'myTopic' -m 'hello world'
Changing the MQTT broker demonstrates there is not a syntax error, however, the question remains why there is an error returned in the original testing