Skip to content

Commit

Permalink
add clientOptions for EventHubClientBuilder (#17519)
Browse files Browse the repository at this point in the history
- add clientOptions for EventHubClientBuilder
  • Loading branch information
backwind1233 authored Nov 12, 2020
1 parent bc930bc commit 050fd75
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package com.azure.spring.integration.eventhub.factory;

import com.azure.core.http.policy.HttpLogOptions;
import com.azure.core.util.ClientOptions;
import com.azure.messaging.eventhubs.EventProcessorClientBuilder;
import com.azure.messaging.eventhubs.EventHubClientBuilder;
import com.azure.messaging.eventhubs.EventHubProducerAsyncClient;
Expand Down Expand Up @@ -70,12 +71,14 @@ private EventHubConsumerAsyncClient createEventHubClient(String eventHubName, St
return new EventHubClientBuilder()
.connectionString(connectionStringProvider.getConnectionString(), eventHubName)
.consumerGroup(consumerGroup)
.clientOptions(new ClientOptions().setApplicationId(SPRING_EVENT_HUB_APPLICATION_ID))
.buildAsyncConsumerClient();
}

private EventHubProducerAsyncClient createProducerClient(String eventHubName) {
return new EventHubClientBuilder()
.connectionString(connectionStringProvider.getConnectionString(), eventHubName)
.clientOptions(new ClientOptions().setApplicationId(SPRING_EVENT_HUB_APPLICATION_ID))
.buildAsyncProducerClient();
}

Expand Down

0 comments on commit 050fd75

Please sign in to comment.