MessagesSentCallback Interface

public interface MessagesSentCallback

The callback interface that defines how this client will notify you once a batch of messages has been sent and acknowledged by the service. Used by InternalClient#sendEventsAsync(List, MessagesSentCallback, Object)

Method Summary

Modifier and Type Method and Description
void onMessagesSent(List<Message> sentMessages, IotHubClientException clientException, Object callbackContext)

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

These messages are sent in bulk and have either all succeeded or all failed to send.

Method Details

onMessagesSent

public void onMessagesSent(List sentMessages, IotHubClientException clientException, Object callbackContext)

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

These messages are sent in bulk and have either all succeeded or all failed to send.

Parameters:

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

Applies to