Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
My code is here.
https://github.com/marvinroger/async-mqtt-client/blob/master/src/AsyncMqttClient.hpp onMqttPublish() is a callback of type OnPublishUserCallback.
The callbacks are called from the functions _onPubAck and _onPubComp. These in turn are called from _onData which is assigned to _client.onData. From here, we can see that this is AsyncClient _client which is defined in ESPAsyncTCP.h which looks to be a core ESP library owned by espressif. Without more digging, I don't see anything that tells me about the context the callback are called within.