MessageSentCallback Interface

public interface MessageSentCallback

The callback interface that defines how this client will notify you once a particular message has been sent and acknowledged by the service. Used by sendEventAsync(Message message, MessageSentCallback callback, Object callbackContext)

Method Summary

Modifier and Type Method and Description
void onMessageSent(Message sentMessage, IotHubClientException clientException, Object callbackContext)

The callback that is executed once the message associated with this callback has been acknowledged by the service.

Method Details

onMessageSent

public void onMessageSent(Message sentMessage, IotHubClientException clientException, Object callbackContext)

The callback that is executed once the message associated with this callback has been acknowledged by the service.

Parameters:

sentMessage - the message that either was sent or failed to send.
clientException - the exception that was encountered while sending the request. If null, no exception was encountered and the message was successfully sent.
callbackContext - a custom context given by the developer. Will be null if no custom context was provided.

Applies to