# MessageId Constructors

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

## MessageId(HierarchicalKey) {#constructor-orleans-durable-messaging-hierarchicalkey-0fcea058}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.messaging.messageid/constructors/constructor-orleans-durable-messaging-hierarchicalkey-0fcea058/)

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

```csharp
public MessageId(HierarchicalKey key)
```

Creates a message identity from a hierarchical key.

### Parameters

- `key` (`HierarchicalKey`): The application identity of the message.
