Condividi tramite


IncomingMessage Class

Definition

The data structure that represents the message that is received from Iot hub.

public class IncomingMessage
type IncomingMessage = class
Public Class IncomingMessage
Inheritance
IncomingMessage

Constructors

IncomingMessage(Byte[])

Creates an instance of this class.

Properties

ContentEncoding

Used to specify the content encoding type of the message.

ContentType

Used to specify the content type of the message.

CorrelationId

A string property that typically contains the MessageId of the request, in request-reply patterns.

CreatedOnUtc

The event creation time when sending one message at a time.

EnqueuedOnUtc

Date and time when the device-to-cloud message was received by the server.

ExpiresOnUtc

The time when this message is considered expired.

InputName

Specifies the input name on which the message was sent, if there was one.

MessageId

An identifier for the message used for request-reply patterns. Format: A case-sensitive string ( up to 128 char long) of ASCII 7-bit alphanumeric chars

  • {'-', ':', '/', '', '.', '+', '%', '_', '#', '*', '?', '!', '(', ')', ',', '=', '@', ';', '$', '''}. Non-alphanumeric characters are from URN RFC.
MessageSchema

Used to specify the schema of the message content.

PayloadConvention

The convention to use with this message payload.

Properties

Gets the dictionary of user properties which are set when user send the data.

SequenceNumber

A number (unique per device-queue) assigned by IoT Hub to each cloud-to-device message.

SystemProperties

Gets the dictionary of system properties which are managed internally.

To

A destination specified in the cloud-to-device message.

UserId

An ID used to specify the origin of messages. When messages are generated by IoT Hub, it is set to {iot hub name}.

Methods

TryGetPayload<T>(T)

The message payload, deserialized to the specified type.

Applies to