How To Create Azure Service Bus Using Azure Portal

Introduction

In this article, we will learn how to create Azure service bus using Azure portal and also understand its benefits.

What is Azure service bus?

Azure Service Bus is a fully managed enterprise message broker with message queues and publish-subscribe topics (in a namespace).

What is Azure service bus namespace?

An azure service bus namespace is a container for all messaging components (queues and topics). Multiple queues and topics can be in a single namespace, and namespaces often serve as application containers.

Why do we use Azure service bus?

Azure service bus is used to decouple applications and services from each other, providing the of benefits:

  • Load-balancing work across competing workers
  • Safely routing and transferring data and control across service and application boundaries
  • Coordinating transactional work that requires a high-degree of reliability

Advance Features of Azure service bus messaging

  1. Message sessions
  2. Auto-forwarding
  3. Dead-lettering
  4. Scheduled delivery
  5. Message deferral
  6. Transactions
  7. Filtering and actions
  8. Auto-delete on idle
  9. Duplicate detection

Step 1 

Login into Azure account. If you don't have an Azure subscription, create a free account

Step 2

Sign in to the Azure portal

Step 3

From the Azure portal menu, or from the Home page, select Create a resource.

Now in Azure portal in the Search box, enter Service Bus.

From the results list, choose Service Bus.

On the Service Bus section, choose Create Service Bus namespace.

On the Create Service Bus namespace section provide the following information,

  1. Subscription: Choose a subscription
  2. Resource Group, Choose Create new and enter a resource group name or you can choose existing resource group created.
  3. Namespace Name: A unique name is required.
  4. Location: Choose region
  5. Pricing: Choose pricing tier.

6. After providing the information above, select Review + Create. Next validation page appears with Create button. You are done. You have created your first azure service bus.

7. Get the connection string:

  1. On the Service Bus Namespace page, select Shared access policies on the left menu.
  2. On the Shared access policies page select RootManageSharedAccessKey.
  3. In the Policy: RootManageSharedAccessKey window, select the copy button next to Primary Connection String, to copy the connection string to your clipboard for later use. Paste this value into Notepad or some other temporary location.

You can use this page to copy primary key, secondary key, primary connection string, and secondary connection string.

How to create queue in the azure portal

  1. On the Service Bus Namespace page, select Queues in the left navigational menu.
  2. On the Queues page, select + Queue on the toolbar.
  3. Enter a name for the queue and leave the other values with their defaults.
  4. Now, select Create.

How to Send messages to the queue in azure portal

Click on created queue, select Service Bus Explorer(preview).

On Service Bus Explorer select send messages, “input message” in message body selects content type plain/text and click on send button.

On service bus explorer click on peek from start and the message that you have sent.

Conclusion

Congratulations you have created your first Azure service bus using Azure portal. Azure service bus provides load-balancing work, safety routing, and transaction work. You can go through menu option provided in created service bus overview page and learn more about it


Similar Articles