Create an Azure Event Hub

This guide walks you through the process of creating an Azure Event Hub using the Azure portal. Event Hubs is a highly scalable data streaming platform and event ingestion service. It can receive and process millions of events per second.

Prerequisites

Steps to Create an Event Hub

1. Navigate to the Azure Portal

Open your web browser and go to the Azure portal. Sign in with your Azure account credentials.

2. Create an Event Hubs Namespace

An Event Hubs namespace is a logical container for all your Event Hubs instances. To create one:

  1. In the Azure portal search bar, type "Event Hubs" and select "Event Hubs" from the results.
  2. Click the + Create button.
  3. On the "Create namespace" page:
    • Subscription: Select your Azure subscription.
    • Resource group: Select an existing resource group or click "Create new" to create a new one.
    • Namespace name: Enter a globally unique name for your namespace. This name will be part of the FQDN (Fully Qualified Domain Name) for your Event Hubs.
    • Location: Choose the Azure region where you want to deploy your namespace.
    • Pricing tier: Select a pricing tier (e.g., Basic, Standard). For production workloads, Standard is recommended.
  4. Click Review + create, and then click Create.

Note: Namespace names must be globally unique across all of Azure.

3. Create an Event Hub within the Namespace

Once your Event Hubs namespace is deployed, you can create an Event Hub within it. Follow these steps:

  1. Navigate to your newly created Event Hubs namespace in the Azure portal.
  2. In the left-hand menu, under "Entities", click on Event Hubs.
  3. Click the + Event Hub button.
  4. On the "Create Event Hub" panel:
    • Name: Enter a name for your Event Hub.
    • Partition count: Specify the number of partitions. This determines the maximum concurrency for readers. For streaming scenarios, consider the throughput requirements.
    • Message retention: Set the duration for which events are retained. The default is 1 day, but it can be configured up to 7 days.
  5. Click Create.

Tip: The partition count is a crucial setting that affects scalability and throughput. Plan this based on your expected event volume and processing concurrency needs.

Verifying Your Event Hub

After creation, you should see your new Event Hub listed under the "Event Hubs" section of your namespace. You can click on the Event Hub name to view its details, including metrics and settings.

You can now use the connection string of your Event Hubs namespace to connect your applications and start sending and receiving events.

Note: You can find the connection string under the "Shared access policies" section of your Event Hubs namespace. Ensure you have appropriate permissions.

To learn how to connect your applications and send/receive messages, refer to the Connecting to an Event Hub guide.

Next: Connect to an Event Hub