From a9c939b63e01c9bc1b4eaa19ee5ad2046d27b344 Mon Sep 17 00:00:00 2001 From: Srikanta Date: Mon, 13 Jan 2020 10:33:45 -0800 Subject: [PATCH 1/2] Update documentation and in-memory checkpoint store sample --- eng/pipelines/client.yml | 3 +- .../azure-messaging-eventhubs/README.md | 5 +- .../EventProcessorClientBuilder.java | 20 ++++--- .../eventhubs/models/EventContext.java | 14 ++--- .../eventhubs/InMemoryCheckpointStore.java | 55 ++++++++++++++++--- .../eventhubs/EventProcessorClientTest.java | 10 ++-- 6 files changed, 72 insertions(+), 35 deletions(-) diff --git a/eng/pipelines/client.yml b/eng/pipelines/client.yml index dbd34c05f803..d27b602a0f8d 100644 --- a/eng/pipelines/client.yml +++ b/eng/pipelines/client.yml @@ -113,7 +113,7 @@ jobs: jdkVersionOption: '1.11' jdkArchitectureOption: 'x64' publishJUnitResults: false - goals: 'install site:site site:stage' + goals: 'site:site site:stage' - script: | git clone https://github.com/JonathanGiles/DependencyChecker.git @@ -148,7 +148,6 @@ jobs: - pwsh: | copy -r target/staging $(Build.ArtifactStagingDirectory) copy eng/code-quality-reports/src/main/resources/index.html $(Build.ArtifactStagingDirectory) - copy eng/spotbugs-aggregate-report/target/spotbugs/spotbugsXml.html (Join-Path $(Build.ArtifactStagingDirectory) "staging") copy output/dependencies.html (Join-Path $(Build.ArtifactStagingDirectory) "staging") displayName: 'Copy reports to artifact staging' condition: ne(variables['Build.Reason'], 'PullRequest') diff --git a/sdk/eventhubs/azure-messaging-eventhubs/README.md b/sdk/eventhubs/azure-messaging-eventhubs/README.md index e03fd68c0eb1..2f34b5315a7a 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/README.md +++ b/sdk/eventhubs/azure-messaging-eventhubs/README.md @@ -319,7 +319,9 @@ managing the underlying consumer operations. In our example, we will focus on building the [`EventProcessorClient`][EventProcessorClient], use the [`InMemoryCheckpointStore`][InMemoryCheckpointStore] available in samples, and a callback function that processes events -received from the Event Hub and writes to console. +received from the Event Hub and writes to console. For production applications, it's recommended to use a durable +store like [Checkpoint Store with Azure Storage Blobs][BlobCheckpointStore]. + ```java @@ -470,5 +472,6 @@ Guidelines](./CONTRIBUTING.md) for more information. [InMemoryCheckpointStore]: ./src/samples/java/com/azure/messaging/eventhubs/InMemoryCheckpointStore.java [LogLevels]: ../../core/azure-core/src/main/java/com/azure/core/util/logging/ClientLogger.java [RetryOptions]: ../../core/azure-core-amqp/src/main/java/com/azure/core/amqp/AmqpRetryOptions.java +[BlobCheckpointStore]: ../azure-messaging-eventhubs-checkpointstore-blob/README.md ![Impressions](https://azure-sdk-impressions.azurewebsites.net/api/impressions/azure-sdk-for-java%2Fsdk%2Feventhubs%2Fazure-messaging-eventhubs%2FREADME.png) diff --git a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java index 1b1d0637b8df..2e306e58fd37 100644 --- a/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java +++ b/sdk/eventhubs/azure-messaging-eventhubs/src/main/java/com/azure/messaging/eventhubs/EventProcessorClientBuilder.java @@ -32,24 +32,26 @@ * EventProcessorClient}. * *

- * To create an instance of {@link EventProcessorClient} that processes events with user-provided callback, configure - * the following fields: + * To create an instance of {@link EventProcessorClient}, the following fields are required: * *