Cloud service · Azure · Updated

Event Hubs - Azure Event Hubs is a managed event-streaming service for ingesting, retaining, and distributing high-volume telemetry and application events.

In short

Event Hubs provides partitioned event streams that decouple producers from independent consumers, supporting real-time processing, replay, and archival. Applications connect through AMQP, Apache Kafka-compatible endpoints, or HTTPS publishing, while Azure manages the underlying streaming infrastructure.

Cloud Services Hub →

10 key features of Event Hubs

01
Partitioned, ordered event streams

Partitions provide parallel ingestion and consumption while preserving event order within each partition. Choose partition keys that preserve necessary relationships without creating hot partitions.

02
Independent consumer groups and replay

Separate applications can read the same stream using independent consumer groups and progress tracking. Consumers can restart from an offset or timestamp while events remain within retention.

03
AMQP, Kafka, and HTTPS connectivity

Use Azure SDKs over AMQP or supported Kafka clients for publishing and consuming; HTTPS supports publishing only. Validate Kafka feature compatibility and configure authentication before migrating an existing application.

04
Tier-based capacity and scaling

Standard uses throughput units, Premium uses processing units, and Dedicated uses capacity units. Standard auto-inflate increases throughput units when needed up to a configured maximum, but does not automatically reduce them afterward.

05
Automatic event capture

Event Hubs Capture writes streaming data to Azure Blob Storage or Azure Data Lake Storage using configured time and size windows. It provides an archival path alongside real-time consumers without requiring a custom exporter.

06
Schema management

Azure Schema Registry provides a central repository for event schemas and supports schema evolution workflows. Integrate compatible serializers and deserializers into producers and consumers to manage data contracts.

07
Identity and network access controls

Authorize applications using Microsoft Entra ID roles or scoped Shared Access Signatures, and use managed identities where possible. Supported network controls include private endpoints, IP restrictions, and Network Security Perimeter; verify availability for the selected tier and deployment.

08
Regional recovery options

Premium and Dedicated support Geo-Replication of namespace metadata and event data to secondary regions. The separate Geo-Disaster Recovery feature replicates namespace configuration only, so it must not be treated as protection for retained event data.

09
Key-based log compaction

Log compaction retains the latest event for each key rather than preserving the complete event history. Use it for streams representing current state, and verify tier support and compaction constraints before selecting this cleanup policy.

10
Confidential computing for Dedicated

Dedicated supports confidential computing using hardware-based trusted execution environments to protect streaming data while it is processed in memory. Evaluate deployment requirements alongside encryption, identity, and network controls for sensitive workloads.

Where Event Hubs is used

  1. 01
    Device and industrial telemetry ingestion

    Collect measurements from device gateways and process them with independent monitoring and analytics applications. Partition by device identifier when per-device ordering matters; use Azure IoT Hub when device provisioning, management, or command delivery is required.

  2. 02
    Operational log distribution

    Receive supported Azure diagnostic logs and application logs, then expose the same stream to security analytics, operational dashboards, and external monitoring systems through separate consumers.

  3. 03
    Real-time application analytics

    Ingest clickstreams, transactions, and application activity for low-latency aggregation. Consumers can compute session metrics, conversion counts, or anomaly indicators without coupling producers to each analytics platform.

  4. 04
    Streaming lake ingestion

    Capture raw events into object storage while processing the live stream for immediate results. Retained files support historical analysis, reconciliation, and rebuilding downstream datasets.

  5. 05
    Kafka-compatible managed ingestion

    Connect compatible Kafka producers and consumers to Event Hubs to avoid operating broker infrastructure. Test client settings, authentication, throughput, and required Kafka APIs before moving production traffic.

  6. 06
    Distribution of change-event streams

    Publish database or application change events through a connector or custom producer so multiple systems can build their own projections. Include stable event identifiers and entity versions so consumers can handle duplicates and detect ordering issues.

How Event Hubs is priced

Basic: throughput units and ingress events

Basic is an entry-level tier billed for provisioned throughput units and incoming events. Its feature set and quotas are more limited than Standard, so verify consumer-group, protocol, networking, and retention requirements before choosing it.

Standard: throughput units and ingress events

Standard is billed for provisioned throughput units and incoming events. Auto-inflate can raise provisioned capacity and therefore cost; configure a maximum and review capacity after traffic peaks.

Premium: processing units

Premium is billed by provisioned processing units rather than Standard-style per-ingress-event charges. Size capacity using representative event sizes, partition counts, consumer fan-out, and processing patterns rather than assuming a fixed throughput per processing unit.

Dedicated: capacity units

Dedicated is billed by provisioned capacity units for a dedicated cluster. It is intended for sustained high-volume workloads or workloads requiring dedicated-tier capabilities; validate minimum capacity and scaling constraints before committing.

Capture, retention, replication, and connected services

Capture is an additional charge in Standard and is included in Premium and Dedicated, but destination storage and operations are billed separately. Extended retention, Geo-Replication, secondary-region capacity, network transfer, and downstream processing can add charges depending on configuration; estimate them using current regional meters.

Services Event Hubs works with

A common architecture uses Event Hubs as the shared ingestion boundary between applications and multiple processing systems. Producers publish once, while Azure Functions handles application-specific processing, Azure Stream Analytics calculates windowed metrics, and Azure Data Explorer provides interactive operational queries. Assign each independent workload its own consumer group so deployments, checkpoints, and processing delays remain isolated.

For combined real-time and historical processing, enable Capture to Azure Blob Storage or Azure Data Lake Storage Gen2 alongside live consumers. Azure Databricks can consume the Kafka-compatible endpoint for streaming transformations and process captured files for backfills. Keep raw archives, application checkpoints, and curated datasets in separately managed locations with appropriate access and lifecycle policies.

Azure Monitor diagnostic settings can feed supported resource logs into the same integration layer for security platforms or analytics consumers. Across these patterns, configure identities and network access for every connection, monitor consumer lag against retention, and make downstream writes tolerant of duplicate processing. Recovery planning must cover the event stream, checkpoint stores, and destination systems rather than relying on namespace replication alone.

Azure Functions

Use an Event Hubs trigger to execute application code against incoming events, commonly in batches. For example, validate telemetry and write normalized records to a database. Give each independent function application its own consumer group, tune batch and concurrency settings, and implement idempotent writes plus an explicit failed-event path.

Azure Stream Analytics

Configure Event Hubs as an input to a Stream Analytics job for SQL-based filtering, joins, and time-window aggregation. For example, calculate average temperature per machine over five-minute windows and send threshold breaches to an output sink. Use a dedicated consumer group and define event-time and late-arrival handling deliberately.

Azure Blob Storage

Enable Capture to archive events to Blob Storage or Data Lake Storage Gen2, typically as Avro files. For example, retain raw application activity for later reconciliation while a separate consumer computes live metrics. Blob Storage also serves as a checkpoint store for Azure SDK event processors; keep checkpoint containers separate from captured data and isolate them by consumer workload.

Azure Databricks

Read Event Hubs through its Kafka-compatible endpoint using Spark Structured Streaming in Azure Databricks. For example, enrich transaction events with reference data and write curated Delta tables. Configure secure authentication, durable Spark checkpoints, and an explicit policy for offsets that have expired from Event Hubs retention.

Azure Data Explorer

Create an Event Hubs data connection to ingest events into Azure Data Explorer tables for Kusto queries. For example, ingest service telemetry for incident investigation and time-series analysis. Configure the event format, ingestion mapping, identity permissions, and a dedicated consumer group, then monitor ingestion failures.

Azure Monitor

Use diagnostic settings on supported Azure resources to export selected logs and metrics to Event Hubs for downstream consumption. For example, stream supported resource logs to an external security platform through its Event Hubs consumer. Check resource-specific category support, regional restrictions, authorization requirements, and firewall access; diagnostic export is distinct from the retiring Azure Monitor Agent preview upload feature.

API Management

Event Hubs can receive records directly from API Management through an Event Hubs logger and the `log-to-eventhub` policy. The policy can select which request or response fields to publish.

App Service

Event Hubs can trigger WebJobs hosted in App Service through the WebJobs Event Hubs binding. App Service also supports configuring connections to Event Hubs through Service Connector.

Artifact Signing

Event Hubs can receive Artifact Signing transaction logs through Azure diagnostic settings, allowing a downstream audit system to track signing activity.

Automation

Event Hubs can receive Azure Automation job logs and job streams through diagnostic settings. A consumer can use the stream to track runbook failures and output across Automation accounts.

Alternatives to Event Hubs in other clouds

AWS

Amazon Managed Streaming for Apache KafkaAmazon Managed Streaming for Apache Kafka

Amazon MSK and Azure Event Hubs both manage the infrastructure for real-time event streaming. Amazon MSK runs Apache Kafka brokers and offers Provisioned and Serverless deployments, while Event Hubs provides a Kafka-compatible endpoint and scales capacity in units that vary by tier.

Compare fact by fact
Event HubsAmazon Managed Streaming for Apache Kafka
Kafka supportKafka endpoint; verify API supportNative Apache Kafka brokers
Capacity scalingTier-based units; Standard auto-inflateBroker units or serverless autoscaling
Provisioned billingCapacity; Basic/Standard ingress eventsHourly capacity plus broker storage
Amazon Kinesis Data StreamsAmazon Kinesis Data Streams

Amazon Kinesis Data Streams and Azure Event Hubs are managed services for ingesting high-volume event streams for real-time processing. Kinesis allocates capacity through shards in each stream and offers on-demand modes that manage capacity automatically, while Event Hubs allocates capacity at the namespace level and can automatically increase, but not decrease, capacity with Standard auto-inflate.

Compare fact by fact
Event HubsAmazon Kinesis Data Streams
Capacity allocationUnits shared across a namespaceShards per stream
Capacity scalingStandard auto-inflate: increases onlyManual shards or automatic on-demand
Billing basisProvisioned units; ingress by tierShard hours + puts, or on-demand usage

What is Event Hubs

3 min read

Azure Event Hubs is an ingestion and streaming layer for telemetry, application activity, operational logs, and other continuous event data. Producers append events to an event hub, and consumers read those events at their own pace. A namespace contains one or more event hubs and provides the endpoints, access controls, networking configuration, and capacity allocation for those streams. Event Hubs stores and distributes events; downstream applications perform transformations, analytics, and business processing.

Each event hub contains partitions, which are ordered event logs. Ordering applies within a partition, not across the entire event hub. Use a partition key, such as a device identifier or customer identifier, when related events must remain together. Avoid keys that concentrate most traffic into a small number of partitions. Partition count determines the practical parallelism available to a coordinated consumer application, while namespace capacity determines how much traffic the service can handle. Increasing consumer instances beyond the available partitions does not automatically increase processing throughput.

Give each independent application its own consumer group so that analytics, alerting, and data export can read the same stream without sharing progress. Consumers track positions using offsets and checkpoints. Azure SDK event processors commonly use Azure Blob Storage for checkpoint persistence and partition ownership coordination, while Kafka clients use Kafka consumer-group mechanisms. Save checkpoints after successful processing, and make downstream writes idempotent because retries and recovery can cause events to be processed more than once. Event Hubs does not provide queue-style per-message settlement or a built-in dead-letter queue; applications must implement failed-event handling.

Retention allows consumers to replay events that remain available in the stream. Configure retention explicitly against the longest expected outage and recovery time, and monitor whether consumers are falling behind. Maximum retention depends on tier: Standard supports up to seven days, while Premium and Dedicated support up to 90 days. Reading an event does not remove it. For longer retention, enable Event Hubs Capture to write the stream to Azure Blob Storage or Azure Data Lake Storage, and use those files for historical analysis or application-controlled replay.

Producers and consumers can use AMQP 1.0 or the Kafka-compatible endpoint; HTTPS supports publishing only. Kafka applications require connection and authentication configuration changes, and teams should validate the Kafka APIs and features their applications depend on rather than assuming complete broker equivalence. Batch publishing to improve efficiency, reuse client connections, and apply bounded retries with backoff for transient failures. Check tier-specific event-size, partition, connection, and throughput limits before deployment.

Prefer managed identities and Microsoft Entra ID data-plane roles over embedded connection strings. Restrict network access using supported firewall and private connectivity options, and configure DNS correctly for private endpoints. Network Security Perimeter provides an additional logical isolation boundary and centralized access rules. Monitor incoming and outgoing traffic, throttling, failures, and consumer lag. Standard auto-inflate can increase throughput units up to a configured ceiling, but reducing that capacity requires a separate action.

For regional recovery, distinguish Geo-Replication from Geo-Disaster Recovery. Geo-Replication in Premium and Dedicated replicates namespace metadata and event data, while Geo-Disaster Recovery replicates configuration rather than the event stream. Test promotion procedures, client reconnection, checkpoint recovery, and downstream deduplication as part of the recovery plan. Use Azure Service Bus instead when the primary requirement is transactional work queues, message settlement, or broker-managed dead-lettering.

Azure architecture icons are the property of Microsoft. BlowStack is not affiliated with or endorsed by Microsoft.

AWS architecture icons are the property of Amazon Web Services. BlowStack is not affiliated with or endorsed by AWS.