Delen via


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.Common.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(ErrorCode, String)

Creates an instance of this class with a specified ErrorCode, error message and marks it as non-transient.

MessageTooLargeException(Int32, String)

Creates an instance of this class with the value of the maximum allowed size of a message in bytes and the tracking Id, and marks it as non-transient.

MessageTooLargeException(Int32)

Creates an instance of this class with the value of the maximum allowed size of a message in bytes, and marks it as non-transient.

MessageTooLargeException(String, Exception)

Creates an instance of this class with a specified error message and a reference to the inner exception that caused this exception, and marks it as non-transient.

MessageTooLargeException(String)

Creates an instance of this class with a specified error message and marks it as non-transient.

Properties

Code

The error code associated with the exception.

(Inherited from IotHubException)
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.

Applies to