# IInboxHandler

Package: [Microsoft.Orleans.Durable](/orleans/docs/api/csharp/microsoft.orleans.durable/) 10.0.0-alpha.1

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/Messaging/IInboxHandler.cs#L12)

```csharp
public interface IInboxHandler
```

Handles inbox messages which it accepts.

## Remarks

The inbox dispatches each message to the first registered handler whose [IInboxHandler](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxhandler/) returns `true`. Selection receives only the message, so a handler stages a terminal outcome only from [IInboxHandler](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxhandler/), after the inbox selects it.

## Methods

- [CanHandle(InboxMessage)](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxhandler/methods/canhandle-orleans-durable-messaging-inboxmessage-a1ec3680/)
- [HandleAsync(IInboxHandlerContext, CancellationToken)](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.iinboxhandler/methods/handleasync-orleans-durable-messaging-iinboxhandlercontext-system-threading-canc-661986e9/)
