Azure Event Hubs Documentation

Guides and tutorials for using Azure Event Hubs effectively.

Creating an Event Hub

This guide will walk you through the steps to create an Azure Event Hub using the Azure portal.

Prerequisites

  • An Azure subscription. If you don't have one, create a free account.
  • An Azure Event Hubs namespace. If you don't have one, you can create it first.

Steps to Create an Event Hub

Step 1: Navigate to your Event Hubs Namespace

Log in to the Azure portal. In the search bar at the top, type "Event Hubs" and select "Event Hubs namespaces" from the results. Click on the namespace where you want to create the Event Hub.

Step 2: Access the Event Hubs Section

In the left-hand menu of your Event Hubs namespace page, under the "Entities" section, click on "Event Hubs".

Step 3: Create a New Event Hub

Click the + Event Hub button at the top of the Event Hubs list.

Azure Event Hubs create button
Step 4: Configure Event Hub Settings

A panel will appear on the right side to configure your new Event Hub. Fill in the following details:

  • Name: Enter a unique name for your Event Hub (e.g., my-data-stream).
  • Partition Count: This determines the number of partitions. Higher numbers allow for greater parallelism in event consumption. Choose a number based on your anticipated throughput and consumer scaling needs. A common starting point is 2 or 4.
  • Message Retention: Specify how long events should be retained in the Event Hub. The default is 1 day, but you can set it up to 7 days.

Optionally, you can configure advanced settings such as availability zones for higher availability.

Step 5: Review and Create

Click the Create button. The portal will provision your Event Hub. This process usually takes a few moments.

Azure Event Hubs creation confirmation

Verifying Creation

Once created, your new Event Hub will appear in the list of Event Hubs for your namespace. You can click on its name to view its properties, metrics, and manage access policies.

Key Concepts

  • Namespace: A container for Event Hubs. It provides a unique DNS name, a scope for management operations, and connection strings for clients.
  • Event Hub: A highly scalable data streaming platform and event ingestion service. It's the primary entity where events are sent and read from.
  • Partition: Event Hubs are partitioned. Each partition is an ordered, immutable sequence of events. Partitions allow for parallel processing of data.

Next Steps

Now that you have created an Event Hub, you can start sending events to it or configuring consumers to read from it. Consider the following: