Quickstart: Create an Azure Event Hubs namespace

This quickstart guides you through creating an Azure Event Hubs namespace using the Azure portal. An Event Hubs namespace is a logical container for your event hubs.

Prerequisites: An Azure subscription is required. If you don't have one, you can create a free account before you begin.

Steps to create an Event Hubs namespace

  1. Sign in to the Azure portal

    Open your web browser and navigate to https://portal.azure.com/. Sign in with your Azure account credentials.

  2. Create a resource

    In the Azure portal, select Create a resource from the top left corner.

  3. Search for Event Hubs

    In the search bar at the top, type "Event Hubs" and select Event Hubs from the results. Then click Create.

  4. Configure namespace settings

    On the Create namespace page, fill out the following details:

    • Subscription: Select your Azure subscription.
    • Resource Group: Choose an existing resource group or click Create new to create a new one. A resource group is a container that holds related Azure resources.
    • Namespace name: Enter a globally unique name for your namespace. The name must be between 6 and 50 characters and can contain only letters, numbers, periods (.), and hyphens (-).
    • Location: Select the Azure region where you want your namespace to be deployed.
    • Pricing tier: Choose a pricing tier. For development and testing, the Basic tier is often sufficient. For production workloads, consider Standard or Premium.

    Click Review + create.

  5. Review and create

    Review the settings you've configured. If everything looks correct, click Create.

  6. Deployment

    Azure will now deploy your Event Hubs namespace. This process typically takes a few minutes. You can monitor the deployment status in the notifications area (bell icon) in the top right corner.

  7. Go to resource

    Once the deployment is complete, click Go to resource to navigate to your newly created Event Hubs namespace overview page.

Example using Azure CLI

You can also create an Event Hubs namespace using the Azure Command-Line Interface (CLI).


# Log in to Azure
az login

# Set your subscription (if you have multiple)
az account set --subscription ""

# Create a resource group
az group create --name myResourceGroup --location eastus

# Create an Event Hubs namespace
az eventhubs namespace create --resource-group myResourceGroup --name myEventHubsNamespace --location eastus --sku Basic
            

Replace <your-subscription-id> with your actual subscription ID, myResourceGroup with your desired resource group name, and myEventHubsNamespace with your desired namespace name.

Congratulations! You have successfully created an Azure Event Hubs namespace.

Next: Create an Event Hub