I am using mosquitto_pub to publish the data with TLS using a topic. I am using mosquitto_sub to subscribe to the topic from mosquitto_pub..
Whenever I fire a mosquitto_pub , I noticed that the wireshark can detect a 3 way handshake each time. My Question now is, is it possible for mosquitto to do only one time of a 3 way handshake? just to minimize the time of sending the data and receiving it to the other end.
I mean like keep the handshake alive on the first firing of mosquitto_pub, then on the succeeding publishing of message, it will send only the TLS data and not do a 3 way handshake over and over again each time.
mosquitto_pub
is the wrong tool for sending multiple messages. There are literally 100s of MQTT client libraries you could use to write your own. – hardillb