Skip to content
Branch: master
Find file History
Fetching latest commit…
Cannot retrieve the latest commit at this time.

Send events to Azure Event Hubs using Java

The Send events to Azure Event Hubs using Java tutorial walks you through ingesting into your event hub using Java with this code.

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----";


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/send-1.0.0-jar-with-dependencies.jar
You can’t perform that action at this time.