Azure Event Hub libraries for Java


Collect and manage millions of events per second from connected IoT devices and applications with Azure Event Hubs.

To get started with Azure Event Hubs, see Receive events from Azure Event Hubs using Java.

Client library

Send events to an Azure Event Hub and consume and process events from an Event Hub using the Event Hubs client library.

Add a dependency to your Maven pom.xml file to use the client library in your project.


Send an event to an event hub.

final ConnectionStringBuilder connStr = new ConnectionStringBuilder()
final EventHubClient ehClient = EventHubClient.createSync(connStr.toString());

final byte[] payloadBytes = "Test AMQP message".getBytes("UTF-8");
final EventData sendEvent = new EventData(payloadBytes);



Explore Event Hub data-plane API using samples

Write to Event Hub via JMS and read from Apache Storm

Read and write from EventHubs using a hybrid .NET/Java topology

Explore more sample Java code for Azure Event Hubs you can use in your apps.