Creating Azure Event Hubs Namespaces

A namespace is a container for all Event Hubs resources. You need to create a namespace before you can create any Event Hubs or other Event Hubs entities within it. This guide walks you through the process of creating a new Event Hubs namespace using the Azure portal.

Prerequisites

  1. An Azure subscription. If you don't have one, you can sign up for a free trial.
  2. Access to the Azure portal.

Steps to Create a Namespace

  1. Sign in to the Azure portal: Navigate to https://portal.azure.com/ and sign in with your Azure account.

  2. Search for Event Hubs: In the Azure portal search bar at the top, type "Event Hubs" and select "Event Hubs" from the search results.

    Azure portal search for Event Hubs
  3. Create Namespace: On the Event Hubs page, click the + Create button.

  4. Configure Basic Settings:

    • Subscription: Select the Azure subscription you want to use.
    • Resource group: Choose an existing resource group or create a new one by clicking "Create new". A resource group is a logical container for your Azure resources.
    • Namespace name: Enter a globally unique name for your Event Hubs namespace. This name will be part of the namespace's endpoint URL.
    • Region: Select the Azure region where you want to deploy your namespace. Choose a region geographically close to your applications or consumers for lower latency.
    • Pricing tier: Select the appropriate pricing tier. The Standard tier is recommended for most production scenarios, offering features like auto-inflate and capture. The Basic tier is suitable for development and testing.
    Azure portal Event Hubs namespace basic configuration
  5. Configure Networking (Optional): You can configure network access settings here. For initial setup, you can leave this as default (public endpoint).

  6. Configure Advanced Settings (Optional):

    • Enable auto-inflate: This feature allows Event Hubs to automatically scale the number of throughput units (TUs) based on traffic.
    • Partition count: For Standard tier, you can specify the number of partitions. Partitions enable parallel processing.
  7. Tags (Optional): Add tags to your namespace for organization and resource management.

  8. Review + create: Click the "Review + create" button to validate your configuration.

  9. Create: After validation passes, click the "Create" button to deploy your Event Hubs namespace.

    Azure portal Event Hubs namespace deployment
Note: Namespace creation can take a few minutes. You will be notified when the deployment is complete.

Accessing Your Namespace

Once the namespace is deployed, you can navigate to it in the Azure portal. From the namespace overview page, you can:

Tip: It's a good practice to use different connection strings for producers and consumers, granting them only the necessary permissions (e.g., 'Send' for producers, 'Listen' for consumers).

Congratulations! You have successfully created an Azure Event Hubs namespace. The next step is to create an Event Hub within this namespace to start sending and receiving events.

Important: Ensure that the namespace name you choose is unique across all of Azure, as it forms part of the FQDN (Fully Qualified Domain Name) for your Event Hubs endpoint.

Continue to the next section to learn how to create an Event Hub within your new namespace.

Next: Creating Event Hubs