Public multiples topic to Mosquitto server using Paho C library [message #1771291] |
Wed, 23 August 2017 13:34  |
Eclipse User |
|
|
|
Hi,
I'm trying g to public multiples topic to Mosquitto server using Paho C library and the first to topic is published OK, but when I tried the second it give me "Connect failed, rc -11".
Note: I'm using "MQTTAsync_publish.c" example as template. I have to connect and disconnect in each publication, required
Waiting for publication of test
on topic MQTT Examples1 for client with ClientID: ExampleClientPub
Successful connection
Message with token value 1 delivery confirmed
Successful disconnection
Second Topic
Waiting for publication of test2
on topic MQTT Examples2 for client with ClientID: ExampleClientPub
Connect failed, rc -11
Thanks,
[Updated on: Wed, 23 August 2017 13:47] by Moderator
|
|
|
|
Re: Public multiples topic to Mosquitto server using Paho C library [message #1795291 is a reply to message #1793927] |
Thu, 20 September 2018 00:28  |
Eclipse User |
|
|
|
There should be no problem in subscribing two or more times quickly. You should check that the MQTT broker doesn't show any errors. If it doesn't, then taking a trace of the Paho client library (see the readme for details) should help work out what is happening.
Note also that it is possible to subscribe to more than 1 topic in the same request.
[Updated on: Thu, 20 September 2018 00:31] by Moderator
|
|
|
Powered by
FUDForum. Page generated in 0.04506 seconds