Udostępnij za pośrednictwem


MessageTooLargeException Class

Definition

The exception that is thrown when an attempt to send a message fails because the length of the message exceeds the maximum size allowed.

[System.Serializable]
public sealed class MessageTooLargeException : Microsoft.Azure.Devices.Client.Exceptions.IotHubException
[<System.Serializable>]
type MessageTooLargeException = class
    inherit IotHubException
Public NotInheritable Class MessageTooLargeException
Inherits IotHubException
Inheritance
MessageTooLargeException
Attributes

Remarks

When the message is too large for IoT hub you will receive this exception. You should attempt to reduce your message size and send again. For more information on message sizes, see IoT hub quotas and throttling | Other limits

Constructors

MessageTooLargeException()

Initializes a new instance of the class.

MessageTooLargeException(Int32)

Initializes a new instance of the class with the message string containing the maximum sized allowed for a message, in bytes.

MessageTooLargeException(String, Exception)

Initializes a new instance of the class with the message string set to the message parameter and a reference to the inner exception that is the cause of this exception.

MessageTooLargeException(String)

Initializes a new instance of the class with the message string set to the message parameter.

Properties

IsTransient

Indicates if the error is transient and should be retried.

(Inherited from IotHubException)
TrackingId

The service returned tracking Id associated with this particular error.

(Inherited from IotHubException)

Methods

GetObjectData(SerializationInfo, StreamingContext)

Sets the SerializationInfo with information about the exception. Use this to set IsTransient and TrackingId to the serialized object data.

(Inherited from IotHubException)

Applies to