# IMessagingExtension Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.imessagingextension/)

## DeliverAsync(InboxMessage, CancellationToken) {#deliverasync-orleans-durable-messaging-inboxmessage-system-threading-cancellatio-29879376}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.imessagingextension/methods/deliverasync-orleans-durable-messaging-inboxmessage-system-threading-cancellatio-29879376/)

```csharp
[Orleans.Alias(DeliverAsync)]
[Orleans.Concurrency.AlwaysInterleave]
public abstract ValueTask<DeliveryResult> DeliverAsync(InboxMessage message, CancellationToken cancellationToken = default(CancellationToken))
```

Delivers a message to this grain's inbox.

### Parameters

- `message` (`InboxMessage`): The received command with a required identity and payload; its receiver is this grain.
- `cancellationToken` (`CancellationToken`): Cancels the caller's wait for delivery.

### Returns

Result indicating delivery/processing status.

### Exceptions

- `System.ArgumentException`: `message` has an unset message ID, exceeds identity admission limits, or has invalid payload or headers. Optional standard metadata is validated where its contract is consumed.
- `System.ArgumentOutOfRangeException`: The message's [InboxMessage](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.inboxmessage/) is later than the receiver's clock plus `DeduplicationWindow`, and the message is untracked and above the admission floor. The inbox stages nothing for it.
