Skip to content

Latest commit

 

History

History
44 lines (30 loc) · 3.18 KB

howto-service-bus-topics.md

File metadata and controls

44 lines (30 loc) · 3.18 KB

What are Service Bus topics and subscriptions?

Service Bus topics and subscriptions support a publish/subscribe messaging communication model. When using topics and subscriptions, components of a distributed application do not communicate directly with each other; instead they exchange messages via a topic, which acts as an intermediary.

TopicConcepts

In contrast with Service Bus queues, in which each message is processed by a single consumer, topics and subscriptions provide a "one-to-many" form of communication, using a publish/subscribe pattern. It is possible to register multiple subscriptions to a topic. When a message is sent to a topic, it is then made available to each subscription to handle/process independently.

A subscription to a topic resembles a virtual queue that receives copies of the messages that were sent to the topic. You can optionally register filter rules for a topic on a per-subscription basis, which enables you to filter or restrict which messages to a topic are received by which topic subscriptions.

Service Bus topics and subscriptions enable you to scale and process a very large number of messages across many users and applications.

Create a namespace

To begin using Service Bus topics and subscriptions in Azure, you must first create a service namespace. A namespace provides a scoping container for addressing Service Bus resources within your application.

To create a namespace:

  1. Log on to the Azure portal.

  2. In the left navigation pane of the portal, click New, then click Enterprise Integration, and then click Service Bus.

  3. In the Create namespace dialog, enter a namespace name. The system immediately checks to see if the name is available.

  4. After making sure the namespace name is available, choose the pricing tier (Basic, Standard, or Premium).

  5. In the Subscription field, choose an Azure subscription in which to create the namespace.

  6. In the Resource group field, choose an existing resource group in which the namespace will live, or create a new one.

  7. In Location, choose the country or region in which your namespace should be hosted.

    Create namespace

  8. Click the Create button. The system now creates your namespace and enables it. You might have to wait several minutes as the system provisions resources for your account.

Obtain the credentials

  1. In the list of namespaces, click the newly created namespace name.

  2. In the Service Bus namespace blade, click Shared access policies.

  3. In the Shared access policies blade, click RootManageSharedAccessKey.

    connection-info

  4. In the Policy: RootManageSharedAccessKey blade, click the copy button next to Connection string–primary key, to copy the connection string to your clipboard for later use.

    connection-string