After updating the KMQTT Client library ( <https:/...
# kotlin-native
After updating the KMQTT Client library ( ) to use Kotlin 1.4.0 the callback handling breaks. What changes were made to CFunction in Kotlin 1.4.0?
You need to tell how it is breaking at the very least for us to help.
The callbacks aren't being called by the C library ( ) that the Kotlin library relies on. All callbacks are set via the MQTTClient_setCallbacks function ( ) that the Kotlin library uses in behind the scenes. Having done some testing with the MQTTClient_setCallbacks function I do know that the function is always returning MQTTCLIENT_SUCCESS in the Kotlin library.
Kotlin Native's memory model is shifting around which could be causing problems. The MQTTClient_setCallbacks function does use multiple threads which could be causing issues.
Found out that I was using the wrong MQTT QoS for the messages when publishing 🤦‍♂️ (in the project which is using the library). With that sorted the callbacks are now working 😄.