# JournalReplayContext.GetRequiredCommandCodec(string, TCodec)

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Journaling/JournalReplayContext.cs#L47-L55)

```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`.
