# EventHubDataAdapter.GetPartitionKey(StreamId)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubdataadapter/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.streaming.eventhubs.eventhubdataadapter/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Azure/Orleans.Streaming.EventHubs/Providers/Streams/EventHub/EventHubDataAdapter.cs#L98)

```csharp
public virtual string GetPartitionKey(StreamId streamId)
```

Get the Event Hub partition key to use for a stream.

### Parameters

- `streamId` (`StreamId`): The stream Guid.

### Returns

The partition key to use for the stream.
