Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add clientOptions for EventHubClientBuilder #17519

Merged
merged 1 commit into from
Nov 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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