Sending of a message from client is known as publisher.
Publisher can send the publish message as soon as it connects to a broker.
Each publish message contains a topic that the broker can use to forward the message to interested clients.Typically each message has a payload which contains the data to transmit in byte format.
Open a source file in the following location >> contiki-ng/examples/mqtt-client/mqtt-client.c Code : mqtt-client.c
Run the simulation
After connecting border router to server use three terminal window for mosquitto publisher,subscriber and MQTT broker for receiving control messages.