Skip to content
Branch: master
Find file History
JamesBirdsall Update Java samples for 3.0.0 client (#455)
* Update client version in poms to 3.0.0

* Remove unwanted files

* Update API names
Latest commit d096ca2 Aug 29, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
src/main
README.md Fixing typos and README's Apr 13, 2018
pom.xml Update Java samples for 3.0.0 client (#455) Aug 29, 2019

README.md

Receive events from Azure Event Hubs using Java

Note: This sample is available as a tutorial here.

The tutorial walks you through the consuming/receiving events from event hub. The sample uses Event Processor Host for consuming the events. Events in an event hub are distributed in various partitions to achieve parallelism while consuming. EPH simplifies processing events from event hub by managing persistent checkpoints and parallel receives.

To run the sample, you need to edit the sample code and provide the following information:

final String namespaceName = "----EventHubsNamespaceName-----";
final String eventHubName = "----EventHubName-----";

final String sasKeyName = "-----SharedAccessSignatureKeyName-----";
final String sasKey = "---SharedAccessSignatureKey----";

final String storageAccountName = "---StorageAccountName----"
final String storageAccountKey = "---StorageAccountKey----";

Prerequisites

Please refer to the overview README for prerequisites and setting up the sample environment, including creating an Event Hubs cloud namespace and an Event Hub.

Build and run

The sample can be built independently with

mvn clean package

and then run with (or just from VS Code or another Java IDE)

java -jar ./target/eventprocessorsample-1.0.0-jar-with-dependencies.jar
You can’t perform that action at this time.