# JournalReplayContext.GetRequiredCommandCodec(string, TCodec)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.journalreplaycontext/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.durable/orleans.durable.journaling.journalreplaycontext/methods/)

[Source](https://github.com/dotnet/orleans/blob/6a0e937f544c35ffcf11b37e4c2b7de5a1580a03/src/Orleans.Durable/Journaling/JournalReplayContext.cs#L49-L57)

```csharp
public TCodec GetRequiredCommandCodec<TCodec>(string entryFormatKey, TCodec writeCommandCodec)
```

Gets the command codec for `entryFormatKey`.

### Parameters

- `entryFormatKey` (`string`): The journal format key for the entry being replayed.
- `writeCommandCodec` (`TCodec`): The command codec for the configured write journal format.

### Returns

The command codec for `entryFormatKey`.
