Creating an Azure Event Hub

This guide walks you through the process of creating an Azure Event Hub using the Azure portal. Event Hubs are a highly scalable data streaming platform and event ingestion service that can serve multiple purposes.

Prerequisites

Steps to Create an Event Hub

1. Navigate to Your Event Hubs Namespace

  1. Sign in to the Azure portal.
  2. In the search bar at the top, type "Event Hubs" and select "Event Hubs Namespaces".
  3. Select the namespace in which you want to create your Event Hub.

2. Create a New Event Hub

  1. In your Event Hubs namespace page, under the "Settings" section, click on "Event Hubs".
  2. Click the + Event Hub button at the top of the Event Hubs list.

3. Configure Event Hub Settings

A "Create Event Hub" panel will appear. Fill in the following details:

After filling in the details, click Create.

Note: The maximum number of Event Hubs per namespace is 100 for Basic tier and 200 for Standard tier.

4. Verification

Once the creation process is complete, you will see a notification in the Azure portal. Your new Event Hub will appear in the list of Event Hubs for your namespace.

You can click on the name of your newly created Event Hub to view its properties, including its connection strings, metrics, and other settings.

Example: Creating an Event Hub using Azure CLI

You can also create an Event Hub using the Azure Command-Line Interface (CLI) for automation.

Tip: Ensure you have the Azure CLI installed and are logged in to your Azure account.

First, create the Event Hub:


az eventhubs event-hubs create --name <event-hub-name> --namespace-name <namespace-name> --resource-group <resource-group-name> --partition-count <number-of-partitions> --message-retention-in-days <retention-days>
        

Example:


az eventhubs event-hubs create --name my-app-events --namespace-name my-eventhub-namespace --resource-group my-resource-group --partition-count 4 --message-retention-in-days 3
        

To confirm creation:


az eventhubs event-hubs list --namespace-name <namespace-name> --resource-group <resource-group-name>
        

Next Steps

Now that you've created an Event Hub, you'll likely want to: