mqtt_clear_inbox

Discards all messages in the inbox.

C Language

int mqtt_clear_inbox( MQTT handle );

ExampleMQTT Vuser Functions

Arguments

NameComments
handleThe MQTT client handle returned by mqtt_create.

General

mqtt_clear_inbox clears the inbox, discarding all messages. Call this function only if the actual content of the messages is not important, for example, if the script tests loading the server.

If invalid arguments are passed, the Vuser aborts, even if Continue on error is set.

Return Values

MQTT_SUCCESS or MQTT_FAIL

Parameterization

Standard parameterization is not available for this function.

Example

mqtt_await_messages(client, MQTT_DEFAULT);

mqtt_clear_inbox(client);