typedef MyQttPublishCodes(* MyQttOnPublish)(MyQttCtx *ctx, MyQttConn *conn, MyQttMsg *msg, axlPointer user_data)

Async notification handler that gets called once a PUBLISH message is received on a listener connection.

This handler allows to control message publication to currently registered connection with general options and/or to implement especific actions upon message reception.

It's important to note that this handler is called before any publish/relay operation takes place.

This handler is used by:

Parameters
ctxThe context where the operation takes place.
connThe connection where the PUBLISH message was received.
msgThe message received. The handler must not release message received. It can acquire references to it.
user_dataUser defined pointer passed in into the function once it gets called.
Returns
The function must report the publish code to the engine so it can act upon it.