def _onPublish(self, mqttc, obj, mid):
with self._messagesLock:<EOL><INDENT>if mid in self._onPublishCallbacks:<EOL><INDENT>midOnPublish = self._onPublishCallbacks.get(mid)<EOL>del self._onPublishCallbacks[mid]<EOL>if midOnPublish != None:<EOL><INDENT>midOnPublish()<EOL><DEDENT><DEDENT>else:<EOL><INDENT>self._onPublishCallbacks[mid] = None<EOL><DEDENT><DEDENT>
Called when a message from the client has been successfully sent to IBM Watson IoT Platform.

See [paho.mqtt.python#on_publish](https://github.com/eclipse/paho.mqtt.python#on_publish) for more information

# Parameters
mqttc (paho.mqtt.client.Client): The client instance for this callback
obj (object): The private user data as set in Client() or user_data_set()
mid (int): Gives the message id of the successfully published message.