Azure Event Hubs Tutorials

Configuring an Azure Event Hubs Namespace

This tutorial guides you through the process of creating and configuring a new Azure Event Hubs namespace. A namespace is a logical container for your Event Hubs resources, such as event hubs and consumer groups.

Prerequisites

Step 1: Navigate to the Azure Portal

Log in to the Azure portal.

Step 2: Create a new Event Hubs Namespace
  1. In the Azure portal search bar, type "Event Hubs" and select "Event Hubs" from the services list.
  2. Click the + Create button or the Create namespace button.
  3. In the "Create namespace" page, select the subscription and resource group you want to use. If you don't have a resource group, you can create a new one.
  4. Enter a unique name for your Event Hubs namespace. This name must be globally unique across Azure.
  5. Select the region where you want to deploy your namespace.
  6. Choose the Pricing tier. For testing and development, the "Basic" tier is often sufficient. For production workloads, consider "Standard" or "Premium".
  7. Review the other settings, such as networking and availability zones, and configure them as needed. For this tutorial, the default settings are usually fine.
  8. Click the Review + create button.
  9. Once the validation passes, click Create.

Deployment may take a few minutes. You will receive a notification when the deployment is complete.

Step 3: Accessing Your Namespace
  1. After deployment, navigate to your newly created Event Hubs namespace. You can find it by searching for its name in the Azure portal.
  2. On the namespace overview page, you'll see key information such as the namespace URI, status, and resource group.
Step 4: Configuring Namespace Settings (Optional but Recommended)

Throughput Units (Standard Tier)

If you chose the Standard tier, you can configure throughput units (TUs). TUs determine the ingress and egress throughput for your namespace. You can adjust these based on your expected workload.

Navigate to Settings -> Scale out within your namespace.

Networking

You can configure network access to your namespace for enhanced security:

Navigate to Settings -> Networking to configure these options.

Shared Access Policies (SAS)

Shared Access Signatures (SAS) provide a way to grant clients access to your Event Hubs namespace with specific permissions (Listen, Send, Manage).

Navigate to Settings -> Shared access policies. You can use the default RootManageSharedAccessKey for initial development, but it's recommended to create more granular policies for production environments.


# Example of a SAS token (DO NOT expose sensitive keys)
# SharedAccessSignature sa=sr%3a%2f%2f....%2feventhubs%2fmyhubs%3anamespace%3dmyevents&sig=AbCdEfGhIjKlMnOpQrStUvWxYz1234567890%3D&se=1678886400
            

Diagnostic Settings

Configure diagnostic settings to send metrics and logs to Azure Monitor, Log Analytics workspaces, or storage accounts for monitoring and troubleshooting.

Navigate to Monitoring -> Diagnostic settings.

Important: For production workloads, it is highly recommended to secure your Event Hubs namespace by disabling public network access and using private endpoints or IP filtering. Also, avoid using the RootManageSharedAccessKey directly in applications; create specific SAS policies with minimal required permissions.

Next Steps

With your Event Hubs namespace configured, you are ready to create event hubs and start sending and receiving data. You can proceed to the next tutorial on Creating an Event Hub.