How to create Azure Event Hub using Azure Portal
Pre-requisite:
You will need azure subscription before you begin.
Create a Resource Group:
-
To create, sign-in to the Azure portal, select ‘Resource Groups’. Then select ‘Create’.
-
On the ‘Create a Resource Group’ page, configure the settings for your new resource group.
-
Optionally, in the ‘Tags’ tab, enter the name and value if you wish to categorize the resource.
-
Select ‘Review + Create’ and then select‘Create’.
Create an Event Hub Namespace:
-
To create, select ‘All Services’ in the left menu and select ‘Event Hubs’ in the ‘Analytics’ Category.
-
Select ‘Event Hubs’. Then select ‘Create’.
-
On the ‘Create Event Hub Namespace’ page, configure the settings for your new event hub namespace.
-
Select ‘Networking’ tab and select your connectivity method.
-
Select ‘Review + Create’, and then ‘Create’.
-
On the ‘Deployment Page’, select ‘Go to resource’.
Create an Event Hub:
-
To create an event hub within the namespace, go to ‘Event Hubs Namespace’ page, select ‘Event Hubs’ under ‘Entities’ category and select '+Event Hub'.
-
Provide a unique name and then select ‘Review + Create’ and then select ‘Create’.
-
We can find the newly created event hub under event hubs list.
-
To communicate with the Azure Event Hub Instance, there will be default shared policy ‘RootManageSharedAccessKey’ created in the Event Hubs Namespace. You can get the connection string from the ‘Event Hubs Namespace’ page.
-
On the ‘Event Hubs Namespace’ page, select ‘Shared access policies’ under ‘Settings’ Category and then select ‘RootManageSharedAccessKey’. You can find the connection string.
-
Alternatively, you can create shared access key for each event hub instance. Normally, SAS tokens for event publishers are created with only send privileges and event consumers are created with only listen privileges on a specific event hub. To achieve this, click on the name of event hub.
-
On the ‘Event Hub Instances’ page, select ‘Shared access policies’ under ‘Settings’ Category and then select ‘+ Add’.
-
Provide ‘Policy Name’ and choose the rights for ‘Send’ operation. Then click ‘Create’ .
-
We can find the newly created SAS policy under the policies list and upon clicking the newly created policy, you can find the connection string for send event.
-
Similarly, you can create the shared access key for receive event.