Event Hub Namespace, Tiers and Configuration
An Event Hub Namespace is the management container that holds one or more Event Hubs. It acts as the top-level resource in Azure for Event Hub and controls access keys, network settings, tier selection, and throughput capacity. All Event Hubs inside a namespace share the namespace's configuration settings.
Event Hub Namespace Structure
+──────────────────────────────────────────────────────────────+ | EVENT HUB NAMESPACE: "prod-events-ns" | | | | Tier: Standard | | Throughput Units: 4 | | Location: East US | | | | +───────────────────────────+ +────────────────────────+ | | | Event Hub: "telemetry" | | Event Hub: "orders" | | | | Partitions: 8 | | Partitions: 4 | | | | Retention: 7 days | | Retention: 3 days | | | | Consumer Groups: | | Consumer Groups: | | | | $Default, analytics, | | $Default, billing | | | | archive, alerts | +────────────────────────+ | | +───────────────────────────+ | +──────────────────────────────────────────────────────────────+
Multiple Event Hubs inside a namespace share the namespace's throughput units and access policies. The namespace provides a single network endpoint. All Event Hubs inside are addressed as: {namespace}.servicebus.windows.net/{eventhub-name}.
Event Hub Tiers in Detail
Basic Tier
The Basic tier is the entry-level option. It supports low-volume, development, and testing scenarios. Key limitations include only one consumer group per Event Hub and a maximum retention of 1 day.
| Property | Basic Tier Value |
|---|---|
| Consumer groups per Event Hub | 1 ($Default only) |
| Message retention | 1 day |
| Throughput units | 1 to 20 |
| Kafka compatibility | Not available |
| Schema Registry | Not available |
| Event Hub Capture | Not available |
| Use case | Development and simple test scenarios |
Standard Tier
The Standard tier is the most widely used tier for production workloads. It supports up to 20 consumer groups per Event Hub, 7-day retention, Kafka compatibility, and optional Capture.
| Property | Standard Tier Value |
|---|---|
| Consumer groups per Event Hub | 20 |
| Message retention | 1 to 7 days |
| Throughput units | 1 to 40 (auto-inflate up to 40) |
| Kafka compatibility | Available |
| Schema Registry | Available |
| Event Hub Capture | Available (additional cost) |
| Use case | Most production workloads |
Premium Tier
The Premium tier runs on single-tenant infrastructure (processing units instead of throughput units). It provides better isolation, predictable performance, and extended retention up to 90 days. It is designed for high-throughput, latency-sensitive workloads.
| Property | Premium Tier Value |
|---|---|
| Consumer groups per Event Hub | 100 |
| Message retention | 1 to 90 days |
| Capacity unit | Processing Units (PUs): 1, 2, 4, 8, 16 |
| Isolation | Single-tenant (dedicated compute and storage) |
| Event Hub Capture | Included at no extra cost |
| Dynamic partition scaling | Supported |
| Use case | High-throughput, compliance-sensitive production |
Dedicated Tier
The Dedicated tier provides an entire Event Hub cluster to a single organization. It is fully isolated and suitable for the most demanding enterprise scenarios with strict compliance requirements.
| Property | Dedicated Tier Value |
|---|---|
| Consumer groups per Event Hub | Unlimited |
| Message retention | Up to 90 days |
| Capacity unit | Capacity Units (CUs): 1 to 20+ |
| Isolation | Fully dedicated hardware cluster |
| Billing model | Fixed monthly cost per cluster capacity unit |
| Use case | Enterprise, government, high-compliance requirements |
Creating an Event Hub Namespace – Step-by-Step
- Open the Azure Portal and search for Event Hubs
- Click + Create
- Select Subscription and Resource Group
- Enter a Namespace Name (globally unique within Azure)
- Select a Location (region)
- Choose a Pricing Tier (Basic, Standard, Premium, or Dedicated)
- For Standard tier: set the initial Throughput Units (1–20)
- Optionally enable Auto-Inflate with a maximum throughput unit limit
- Click Review + Create, then Create
Creating an Event Hub Inside a Namespace
- Open the newly created Event Hub Namespace
- Click + Event Hub
- Enter a name for the Event Hub
- Set Partition Count (2 to 32 for Standard; up to 2,000 for Premium/Dedicated)
- Set Message Retention in days (within the tier limit)
- Optionally configure Capture (Standard/Premium)
- Click Create
Event Retention Configuration
Event retention defines how long events remain available in Event Hub partitions. Consumers can read any event within the retention window, regardless of whether it was already processed by other consumers.
Example: 7-day retention
Day 1: Events E1, E2, E3 arrive
Day 3: Consumer A processes E1, E2, E3 (marks as processed in its consumer group)
Day 5: A new Consumer B is added. It starts reading from the beginning.
Consumer B can read E1, E2, E3 — they are still retained.
Day 8: E1, E2, E3 are automatically deleted (past 7-day retention window).
Consumer B can no longer access E1, E2, E3.
Auto-Inflate (Standard Tier)
Auto-Inflate automatically increases throughput units when the namespace approaches its current limit. This prevents throttling during unexpected traffic spikes without manual intervention.
Auto-Inflate Configuration: Current TUs: 4 Auto-Inflate: Enabled Maximum TUs: 15 Normal day: 4 TUs sufficient Traffic spike: Event Hub auto-scales to 6 TUs, then 8 TUs as needed Spike ends: TUs remain at 8 (Auto-Inflate does not scale down automatically) Note: Scaling down TUs must be done manually.
Shared Access Policies (Connection Strings)
Access to the Event Hub Namespace uses Shared Access Policies. Each policy grants specific rights: Listen (consume events), Send (publish events), or Manage (full administration). Connection strings are derived from these policies and used in producer and consumer applications.
| Policy Right | Grants Permission To | Use In |
|---|---|---|
| Listen | Read events from Event Hub partitions | Consumer applications |
| Send | Publish events to Event Hub | Producer applications |
| Manage | Listen + Send + create/delete Event Hubs | Administrative tools only |
Best Practice: Separate Policies
Recommended setup: Policy "producers-policy": Send right only --> Connection string given to IoT devices and applications that publish events Policy "consumers-policy": Listen right only --> Connection string given to analytics apps and consumers Policy "admin-policy": Manage right --> Used only by DevOps scripts; never embedded in applications
Event Hub Namespace Configuration – Checklist
| Configuration Item | Recommendation |
|---|---|
| Tier selection | Standard for most production; Premium for high-compliance or long retention needs |
| Initial throughput units | Start conservatively; enable Auto-Inflate with a reasonable maximum |
| Partition count | Match expected consumer parallelism; plan for future growth |
| Retention period | Set to cover the longest expected consumer catch-up time |
| Access policies | Create separate Send-only and Listen-only policies |
| Network access | Use IP filtering or Private Endpoints for production namespaces |
| Managed identity | Use Azure AD managed identity instead of connection strings in production |
Summary
An Event Hub Namespace is the container that organizes and secures all Event Hubs in a single unit. Tier selection determines retention, consumer group limits, isolation level, and features available. Partitions, retention, and throughput units are the three primary configuration levers that control capacity and behavior. Proper namespace design from the start prevents costly architectural changes later.
