# EventHubOptions Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.configuration.eventhuboptions/)

## ConfigureEventHubConnection(CreateConnectionDelegate, string, string) {#configureeventhubconnection-orleans-configuration-eventhuboptions-createconnecti-12948cfd}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.configuration.eventhuboptions/methods/configureeventhubconnection-orleans-configuration-eventhuboptions-createconnecti-12948cfd/)

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

```csharp
public void ConfigureEventHubConnection(CreateConnectionDelegate createConnection, string eventHubName, string consumerGroup)
```

Configures the Azure Event Hub connection using the provided delegate.

### Parameters

- `createConnection` (`CreateConnectionDelegate`)
- `eventHubName` (`string`)
- `consumerGroup` (`string`)

## ConfigureEventHubConnection(EventHubConnection, string) {#configureeventhubconnection-azure-messaging-eventhubs-eventhubconnection-string-239b2b1a}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.configuration.eventhuboptions/methods/configureeventhubconnection-azure-messaging-eventhubs-eventhubconnection-string-239b2b1a/)

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

```csharp
public void ConfigureEventHubConnection(EventHubConnection connection, string consumerGroup)
```

Configures the Azure Event Hub connection using the provided connection instance.

### Parameters

- `connection` (`EventHubConnection`)
- `consumerGroup` (`string`)

## ConfigureEventHubConnection(string, string, string) {#configureeventhubconnection-string-string-string-ac7da8c2}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.configuration.eventhuboptions/methods/configureeventhubconnection-string-string-string-ac7da8c2/)

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

```csharp
public void ConfigureEventHubConnection(string connectionString, string eventHubName, string consumerGroup)
```

Configures the Azure Event Hub connection using the provided connection string.

### Parameters

- `connectionString` (`string`)
- `eventHubName` (`string`)
- `consumerGroup` (`string`)

## ConfigureEventHubConnection(string, string, string, AzureNamedKeyCredential) {#configureeventhubconnection-string-string-string-azure-azurenamedkeycredential-39f56925}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.configuration.eventhuboptions/methods/configureeventhubconnection-string-string-string-azure-azurenamedkeycredential-39f56925/)

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

```csharp
public void ConfigureEventHubConnection(string fullyQualifiedNamespace, string eventHubName, string consumerGroup, AzureNamedKeyCredential credential)
```

Configures the Azure Event Hub connection using the provided fully-qualified namespace string and credential.

### Parameters

- `fullyQualifiedNamespace` (`string`)
- `eventHubName` (`string`)
- `consumerGroup` (`string`)
- `credential` (`AzureNamedKeyCredential`)

## ConfigureEventHubConnection(string, string, string, AzureSasCredential) {#configureeventhubconnection-string-string-string-azure-azuresascredential-72ec2e9c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.configuration.eventhuboptions/methods/configureeventhubconnection-string-string-string-azure-azuresascredential-72ec2e9c/)

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

```csharp
public void ConfigureEventHubConnection(string fullyQualifiedNamespace, string eventHubName, string consumerGroup, AzureSasCredential credential)
```

Configures the Azure Event Hub connection using the provided fully-qualified namespace string and credential.

### Parameters

- `fullyQualifiedNamespace` (`string`)
- `eventHubName` (`string`)
- `consumerGroup` (`string`)
- `credential` (`AzureSasCredential`)

## ConfigureEventHubConnection(string, string, string, TokenCredential) {#configureeventhubconnection-string-string-string-azure-core-tokencredential-6c4f03fb}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.streaming.eventhubs/orleans.configuration.eventhuboptions/methods/configureeventhubconnection-string-string-string-azure-core-tokencredential-6c4f03fb/)

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

```csharp
public void ConfigureEventHubConnection(string fullyQualifiedNamespace, string eventHubName, string consumerGroup, TokenCredential credential)
```

Configures the Azure Event Hub connection using the provided fully-qualified namespace string and credential.

### Parameters

- `fullyQualifiedNamespace` (`string`)
- `eventHubName` (`string`)
- `consumerGroup` (`string`)
- `credential` (`TokenCredential`)
