Azure Event Hubs client library samples for Java
Azure Event Hubs samples are a set of self-contained Java programs that demonstrate interacting with Azure Event Hubs using the client library. Each sample focuses on a specific scenario and can be executed independently.
Key concepts are explained in detail here.
Please refer to the Getting Started section.
Obtaining an Event Hub instance connection string
All the samples authorize with an Event Hub using a connection string generated for that Event Hub. The connection string value can be obtained by:
- Going to your Event Hubs namespace in Azure Portal.
- Creating an Event Hub instance.
- Creating a "Shared access policy" for your Event Hub instance.
- Copying the connection string from the policy's properties.
- Inspect Event Hub and partition properties
- Publish events using Microsoft identity platform
- Publish events to a specific Event Hub partition with partition identifier
- Publish events to a specific Event Hub partition with partition key
- Publish events to an Event Hub with a size-limited batch
- Publish events using web sockets and a proxy
- Publish events with custom metadata
- Publish events with EventHubBufferedProducerClient
- Publish stream of events
- Publish events through an intermediary endpoint
- Publish events and consume events using a shared connection
- Consume events from an Event Hub partition
- Consume events from all partitions using EventProcessorClient
- Consume events from all partitions and checkpoint after some number of events
- Consume events from all partitions and manage state of events using EventProcessorClient
- Consume events from all partitions and provide an initial EventPosition
- Consume events starting from an event sequence number
See Next steps.
If you would like to become an active contributor to this project please refer to our Contribution Guidelines for more information.