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 setter to configure ClientOptions on processor builder #18148

Merged
merged 5 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
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
4 changes: 2 additions & 2 deletions eng/jacoco-test-coverage/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,12 +194,12 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs</artifactId>
<version>5.4.0-beta.2</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->
<version>5.4.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs-checkpointstore-blob</artifactId>
<version>1.4.0-beta.2</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;current} -->
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
4 changes: 2 additions & 2 deletions eng/versioning/version_client.txt
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ com.azure:azure-e2e;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-identity;1.2.2;1.3.0-beta.1
com.azure:azure-identity-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-messaging-eventgrid;2.0.0-beta.3;2.0.0-beta.4
com.azure:azure-messaging-eventhubs;5.3.1;5.4.0-beta.2
com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.3.1;1.4.0-beta.2
com.azure:azure-messaging-eventhubs;5.3.1;5.4.0
com.azure:azure-messaging-eventhubs-checkpointstore-blob;1.3.1;1.4.0
com.azure:azure-messaging-servicebus;7.0.0;7.1.0-beta.1
com.azure:azure-messaging-servicebus-track1-perf;1.0.0-beta.1;1.0.0-beta.1
com.azure:azure-messaging-servicebus-track2-perf;1.0.0-beta.1;1.0.0-beta.1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Release History

## 1.4.0-beta.2 (Unreleased)
## 1.4.0 (2021-01-14)
### Dependency Updates
- Update `azure-messaging-eventhubs` dependency to `5.3.2`.

## 1.4.0-beta.1 (2020-11-12)
### Dependency Updates
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ documentation][event_hubs_product_docs] | [Samples][sample_examples]
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs-checkpointstore-blob</artifactId>
<version>1.3.1</version>
<version>1.4.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs-checkpointstore-blob</artifactId>
<version>1.4.0-beta.2</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;current} -->
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;current} -->

<name>Microsoft Azure client library for storing checkpoints in Storage Blobs</name>
<description>Library for using storing checkpoints in Storage Blobs</description>
Expand All @@ -40,7 +40,7 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs</artifactId>
<version>5.4.0-beta.2</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->
<version>5.4.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
Expand Down
10 changes: 9 additions & 1 deletion sdk/eventhubs/azure-messaging-eventhubs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Release History

## 5.4.0-beta.2 (Unreleased)
## 5.4.0 (2021-01-14)
### New features
- Add `clientOptions` to `EventProcessorClientBuilder` to support setting user's application id used in user-agent
property of the amqp connection.

### Dependency Updates
- Update `azure-core` dependency to `1.12.0`.
- Update `azure-core-amqp` dependency to `2.0.1`.
- Update `azure-identity` dependency to `1.2.2`.

## 5.4.0-beta.1 (2020-11-12)
### Breaking changes
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhubs/azure-messaging-eventhubs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ documentation][event_hubs_product_docs] | [Samples][sample_examples]
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs</artifactId>
<version>5.3.1</version>
<version>5.4.0</version>
</dependency>
```
[//]: # ({x-version-update-end})
Expand Down
2 changes: 1 addition & 1 deletion sdk/eventhubs/azure-messaging-eventhubs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs</artifactId>
<version>5.4.0-beta.2</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->
<version>5.4.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->

<name>Microsoft Azure client library for Event Hubs</name>
<description>Libraries built on Microsoft Azure Event Hubs</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
import com.azure.core.annotation.ServiceClientBuilder;
import com.azure.core.credential.TokenCredential;
import com.azure.core.exception.AzureException;
import com.azure.core.util.ClientOptions;
import com.azure.core.util.Configuration;
import com.azure.core.util.logging.ClientLogger;
import com.azure.core.util.tracing.Tracer;
Expand Down Expand Up @@ -211,6 +212,19 @@ public EventProcessorClientBuilder retry(AmqpRetryOptions retryOptions) {
return this;
}

/**
* Sets the client options for the processor client. The application id set on the client options will be used
* for tracing. The headers set on {@code ClientOptions} are currently not used but can be used in later releases
* to add to AMQP message.
*
* @param clientOptions The client options.
* @return The updated {@link EventProcessorClientBuilder} object.
*/
public EventProcessorClientBuilder clientOptions(ClientOptions clientOptions) {
eventHubClientBuilder.clientOptions(clientOptions);
return this;
}

/**
* Sets the consumer group name from which the {@link EventProcessorClient} should consume events.
*
Expand Down
4 changes: 2 additions & 2 deletions sdk/eventhubs/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs</artifactId>
<version>5.4.0-beta.2</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->
<version>5.4.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs;current} -->
</dependency>
<dependency>
<groupId>com.azure</groupId>
<artifactId>azure-messaging-eventhubs-checkpointstore-blob</artifactId>
<version>1.4.0-beta.2</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;current} -->
<version>1.4.0</version> <!-- {x-version-update;com.azure:azure-messaging-eventhubs-checkpointstore-blob;current} -->
</dependency>
</dependencies>

Expand Down