I am using PubSubClient.h to connect with AWS IoT and it worked fine with shadow topics with the following line
while (!virtual_thing.connect(virtual_thing_name.c_str())){
}
when I tried to do the same for Last Will and Testament topic with the following line , it failed with -4 MQTT state
while (!virtual_thing.connect(virtual_thing_name.c_str(), NULL, NULL, "theEndTopic", 1, true, "offline")){
}
exactly, where is the issue lying ??
2 posts - 2 participants