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
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.
In the left-hand menu of your Event Hubs namespace page, under the "Entities" section, click on "Event Hubs".
Click the + Event Hub button at the top of the Event Hubs list.
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.
Click the Create button. The portal will provision your Event Hub. This process usually takes a few moments.
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: