use of com.microsoft.azure.sdk.iot.device.IotHubMessageResult in project azure-iot-sdk-java by Azure.
the class SampleMessageReceiveCallback method execute.
@Override
public IotHubMessageResult execute(Message msg, Object context) {
log.debug("Received message with content: {}", new String(msg.getBytes(), Message.DEFAULT_IOTHUB_MESSAGE_CHARSET));
for (MessageProperty messageProperty : msg.getProperties()) {
log.debug("{}: {}", messageProperty.getName(), messageProperty.getValue());
}
IotHubMessageResult res = IotHubMessageResult.COMPLETE;
log.debug("Responding to message with {}", res.name());
return res;
}
Aggregations