update eventhub related package (#721)

Co-authored-by: unknown <fenzho@FZHOU.fareast.corp.microsoft.com>
This commit is contained in:
loveyzhou 2020-07-03 09:42:25 +08:00 коммит произвёл GitHub
Родитель 62713869a4
Коммит f468778f2d
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
3 изменённых файлов: 10 добавлений и 4 удалений

Просмотреть файл

@ -34,4 +34,6 @@ public class Constants {
public static final String SPRING_INTEGRATION_STORAGE_QUEUE_APPLICATION_ID =
String.join("-", AZURE, SPRING_INTEGRATION, STORAGE_QUEUE) + "/" + SPRING_CLOUD_VERSION;
public static final String SPRING_EVENT_HUB_APPLICATION_ID =
String.join("-", AZURE, SPRING_CLOUD, EVENT_HUB) + "/" + SPRING_CLOUD_VERSION;
}

Просмотреть файл

@ -55,8 +55,8 @@
<hibernate.validator.version>6.1.0.Final</hibernate.validator.version>
<google.guava.version>24.1.1-jre</google.guava.version>
<azure.sdk.version>1.33.0</azure.sdk.version>
<azure.eventhubs.version>5.0.2</azure.eventhubs.version>
<azure.eventhubs.checkpoint.store.version>1.0.2</azure.eventhubs.checkpoint.store.version>
<azure.eventhubs.version>5.1.1</azure.eventhubs.version>
<azure.eventhubs.checkpoint.store.version>1.1.1</azure.eventhubs.checkpoint.store.version>
<azure.storage.blob.version>12.5.0</azure.storage.blob.version>
<azure.storage.file.version>12.3.0</azure.storage.file.version>
<azure.storage.queue.version>12.4.0</azure.storage.queue.version>
@ -64,11 +64,11 @@
<azure.servicebus.version>3.1.1</azure.servicebus.version>
<javax.jms-api.version>2.0.1</javax.jms-api.version>
<qpid-jms-client.version>0.43.0</qpid-jms-client.version>
<azure-core.version>1.3.0</azure-core.version>
<azure-core.version>1.5.1</azure-core.version>
<azure-data-appconfiguration.version>1.1.0</azure-data-appconfiguration.version>
<azure-identity.version>1.0.4</azure-identity.version>
<azure-security-keyvault-secrets.version>4.1.1</azure-security-keyvault-secrets.version>
<azure-core-http-netty.version>1.3.0</azure-core-http-netty.version>
<azure-core-http-netty.version>1.5.2</azure-core-http-netty.version>
</properties>
<dependencyManagement>

Просмотреть файл

@ -6,6 +6,7 @@
package com.microsoft.azure.spring.integration.eventhub.factory;
import com.azure.core.http.policy.HttpLogOptions;
import com.azure.messaging.eventhubs.EventHubClientBuilder;
import com.azure.messaging.eventhubs.EventHubConsumerAsyncClient;
import com.azure.messaging.eventhubs.EventHubProducerAsyncClient;
@ -32,6 +33,8 @@ import java.util.function.BiFunction;
import java.util.function.Consumer;
import java.util.function.Function;
import static com.microsoft.azure.spring.cloud.context.core.util.Constants.SPRING_EVENT_HUB_APPLICATION_ID;
/**
* Default implementation of {@link EventHubClientFactory}.
*
@ -91,6 +94,7 @@ public class DefaultEventHubClientFactory implements EventHubClientFactory, Disp
BlobContainerAsyncClient blobClient = new BlobContainerClientBuilder()
.connectionString(checkpointStorageConnectionString)
.containerName(containerName)
.httpLogOptions(new HttpLogOptions().setApplicationId(SPRING_EVENT_HUB_APPLICATION_ID))
.buildAsyncClient();
final Boolean isContainerExist = blobClient.exists().block();