Skip to content

Error in publishing message using the MQTT client. #887

Closed
@testover99

Description

@testover99

In which file did you encounter the issue?

java-docs-samples/iot/api-client/mqtt_example/src/main/java/com/google/cloud/iot/examples/MqttExample.java

On publishing the payload at line 168 in MqttExample.java class, paho client is giving the following error:

I believe my parameters are correct as if I update the configuration of the device from the console, I receive on my MQTT client.

Exception in thread "main" Connection lost (32109) - java.io.EOFException
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:146)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.io.EOFException
	at java.io.DataInputStream.readByte(Unknown Source)
	at org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:65)
	at org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:107)
	... 1 more

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions