Description
hi teams
I'm using the latest version of embedded sdk in my arm-linux device. I found an error that MQTT_Publish() return MQTTSuccess,but in fact there are no messages in broker ,and after 5 seconds it returns MQTTKeepAliveTimeout because of the bad network condition.I set QOS0 for my msgs.
why it is like that in poor network condition?
my code is like below:
mqttStatus = MQTT_Publish( &AwsMqttContext,&outgoingPublishPackets[publishIndex].pubInfo,outgoingPublishPackets[publishIndex ].packetId);
if(mqttStatus!=MQTTSuccess )
{
printf("Failed to send PUBLISH packet to broker with error = %s.",MQTT_Status_strerror(mqttStatus));
returnStatus = EXIT_FAILURE;
cleanupOutgoingPublish( publishIndex );
}
else
{
printf( "PUBLISH sent for topic %.*s to broker with packet ID %u.\n\n",strlen(pub_topic),pub_topic,outgoingPublishPackets[ publishIndex ].packetId);
}
The log file is in the attachment.