Create an Azure Event Hubs Namespace
An Azure Event Hubs namespace is a logical container for your Event Hubs instances. It provides a unique scope for Event Hubs, and you'll use it to group related hubs and manage access policies. This guide walks you through the process of creating a new Event Hubs namespace using the Azure portal.
Before you begin, ensure you have:
- An active Azure subscription. If you don't have one, you can create a free account.
Steps to Create a Namespace
1. Navigate to the Azure Portal
Open your web browser and navigate to the Azure portal. Sign in with your Azure account credentials.
2. Create a Resource
In the Azure portal, click on the + Create a resource button located at the top-left corner.
You'll see a search bar. Type Event Hubs into the search bar and press Enter.
Select Event Hubs from the search results.
3. Configure Namespace Details
On the Event Hubs page, click Create.
You will be presented with a form to configure your new Event Hubs namespace. Fill in the following details:
- Subscription: Select the Azure subscription under which you want to create the namespace.
- Resource group: Choose an existing resource group or create a new one by clicking Create new. A resource group is a logical container that holds related Azure resources.
- Namespace name: Enter a globally unique name for your Event Hubs namespace. This name will be part of the FQDN (Fully Qualified Domain Name) for your namespace, for example,
yournamespace.servicebus.windows.net. - Location: Select the Azure region where you want to deploy your namespace. Choose a region that is geographically close to your applications or users.
- Pricing tier: Select a pricing tier. The Standard tier is recommended for production workloads as it offers more features and higher throughput. The Basic tier is suitable for development and testing.
Namespace names must be globally unique across all Azure customers. Once created, the namespace name cannot be changed.
4. Review and Create
Once you have filled in all the required details, click on the Review + create button.
Azure will validate your configuration. After validation passes, review the settings and click Create to provision your Event Hubs namespace.
The deployment process may take a few minutes. You can monitor the deployment progress in the Azure portal notifications.
5. Accessing Your Namespace
After the deployment is complete, you can navigate to your Event Hubs namespace by clicking Go to resource. From there, you can create Event Hubs instances within this namespace, configure access policies, and manage your Event Hubs resources.
Example using Azure CLI
You can also create an Event Hubs namespace using the Azure Command-Line Interface (CLI).
// Replace MyResourceGroup and myuniqueeventhubnamespace with your desired names.
For detailed information on Azure CLI commands, refer to the Azure CLI documentation.
Now that you have created a namespace, you can proceed to create your first Event Hub. See our guide on Creating an Event Hub.