Skip to content

Commit 050fd75

Browse files
authored
add clientOptions for EventHubClientBuilder (Azure#17519)
- add clientOptions for EventHubClientBuilder
1 parent bc930bc commit 050fd75

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

sdk/spring/azure-spring-integration-eventhubs/src/main/java/com/azure/spring/integration/eventhub/factory/DefaultEventHubClientFactory.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
package com.azure.spring.integration.eventhub.factory;
55

66
import com.azure.core.http.policy.HttpLogOptions;
7+
import com.azure.core.util.ClientOptions;
78
import com.azure.messaging.eventhubs.EventProcessorClientBuilder;
89
import com.azure.messaging.eventhubs.EventHubClientBuilder;
910
import com.azure.messaging.eventhubs.EventHubProducerAsyncClient;
@@ -70,12 +71,14 @@ private EventHubConsumerAsyncClient createEventHubClient(String eventHubName, St
7071
return new EventHubClientBuilder()
7172
.connectionString(connectionStringProvider.getConnectionString(), eventHubName)
7273
.consumerGroup(consumerGroup)
74+
.clientOptions(new ClientOptions().setApplicationId(SPRING_EVENT_HUB_APPLICATION_ID))
7375
.buildAsyncConsumerClient();
7476
}
7577

7678
private EventHubProducerAsyncClient createProducerClient(String eventHubName) {
7779
return new EventHubClientBuilder()
7880
.connectionString(connectionStringProvider.getConnectionString(), eventHubName)
81+
.clientOptions(new ClientOptions().setApplicationId(SPRING_EVENT_HUB_APPLICATION_ID))
7982
.buildAsyncProducerClient();
8083
}
8184

0 commit comments

Comments
 (0)