You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/service-bus-messaging/includes/service-bus-create-namespace-portal.md
+11-4Lines changed: 11 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,9 +23,13 @@ To create a namespace:
23
23
1. For **Subscription**, choose an Azure subscription in which to create the namespace.
24
24
1. For **Resource group**, choose an existing resource group in which the namespace will live, or create a new one.
25
25
1. Enter a **name for the namespace**. The system immediately checks to see if the name is available. For a list of rules for naming namespaces, see [Create Namespace REST API](/rest/api/servicebus/create-namespace).
26
-
1. For **Location**, choose the region in which your namespace should be hosted.1.
27
-
1. For **Pricing tier**, select the pricing tier (Basic, Standard, or Premium) for the namespace. If you want to use [topics and subscriptions](../service-bus-queues-topics-subscriptions.md#topics-and-subscriptions), choose either Standard or Premium. Topics/subscriptions are not supported in the Basic pricing tier. If you selected the **Premium** pricing tier, specify the number of **messaging units**. The premium tier provides resource isolation at the CPU and memory level so that each workload runs in isolation. This resource container is called a messaging unit. A premium namespace has at least one messaging unit. You can select 1, 2, or 4 messaging units for each Service Bus Premium namespace. For more information, see [Service Bus Premium Messaging](../service-bus-premium-messaging.md).
28
-
7. Select **Review + create**. The system now creates your namespace and enables it. You might have to wait several minutes as the system provisions resources for your account.
26
+
1. For **Location**, choose the region in which your namespace should be hosted.
27
+
1. For **Pricing tier**, select the pricing tier (Basic, Standard, or Premium) for the namespace. For this quickstart, select **Standard**.
28
+
29
+
If you want to use [topics and subscriptions](../service-bus-queues-topics-subscriptions.md#topics-and-subscriptions), choose either Standard or Premium. Topics/subscriptions aren't supported in the Basic pricing tier.
30
+
31
+
If you selected the **Premium** pricing tier, specify the number of **messaging units**. The premium tier provides resource isolation at the CPU and memory level so that each workload runs in isolation. This resource container is called a messaging unit. A premium namespace has at least one messaging unit. You can select 1, 2, or 4 messaging units for each Service Bus Premium namespace. For more information, see [Service Bus Premium Messaging](../service-bus-premium-messaging.md).
32
+
1. Select **Review + create**. The system now creates your namespace and enables it. You might have to wait several minutes as the system provisions resources for your account.
29
33
30
34
:::image type="content" source="./media/service-bus-create-namespace-portal/create-namespace.png" alt-text="Image showing the Create a namespace page":::
31
35
1. On the **Review + create** page, review settings, and select **Create**.
@@ -37,7 +41,9 @@ To create a namespace:
37
41
:::image type="content" source="./media/service-bus-create-namespace-portal/service-bus-namespace-home-page.png" alt-text="Image showing the home page of the Service Bus namespace created." :::
38
42
39
43
## Get the connection string
40
-
Creating a new namespace automatically generates an initial Shared Access Signature (SAS) rule with an associated pair of primary and secondary keys that each grant full control over all aspects of the namespace. See [Service Bus authentication and authorization](../service-bus-authentication-and-authorization.md) for information about how to create rules with more constrained rights for regular senders and receivers. To copy the primary and secondary keys for your namespace, follow these steps:
44
+
Creating a new namespace automatically generates an initial Shared Access Signature (SAS) policy with primary and secondary keys, and primary and secondary connection strings that each grant full control over all aspects of the namespace. See [Service Bus authentication and authorization](../service-bus-authentication-and-authorization.md) for information about how to create rules with more constrained rights for regular senders and receivers.
45
+
46
+
To copy the primary connection string for your namespace, follow these steps:
41
47
42
48
1. On the **Service Bus Namespace** page, select **Shared access policies** on the left menu.
43
49
3. On the **Shared access policies** page, select **RootManageSharedAccessKey**.
@@ -47,3 +53,4 @@ Creating a new namespace automatically generates an initial Shared Access Signat
47
53
48
54
:::image type="content" source="./media/service-bus-create-namespace-portal/connection-string.png" alt-text="Screenshot shows an S A S policy called RootManageSharedAccessKey, which includes keys and connection strings.":::
49
55
56
+
You can use this page to copy primary key, secondary key, and secondary connection string.
Copy file name to clipboardExpand all lines: articles/service-bus-messaging/service-bus-dotnet-get-started-with-queues.md
+21-4Lines changed: 21 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -62,7 +62,6 @@ This section shows you how to create a .NET Core console application to send mes
62
62
1. In **Program.cs**, add the following `using` statements at the top of the namespace definition, before the class declaration.
63
63
64
64
```csharp
65
-
using System;
66
65
using System.Threading.Tasks;
67
66
using Azure.Messaging.ServiceBus;
68
67
```
@@ -255,7 +254,6 @@ In this section, you'll add code to retrieve messages from the queue.
255
254
1. In **Program.cs**, add the following `using` statements at the top of the namespace definition, before the class declaration.
256
255
257
256
```csharp
258
-
using System;
259
257
using System.Threading.Tasks;
260
258
using Azure.Messaging.ServiceBus;
261
259
```
@@ -270,14 +268,33 @@ In this section, you'll add code to retrieve messages from the queue.
270
268
// name of your Service Bus queue
271
269
static string queueName = "<QUEUE NAME>";
272
270
273
-
274
271
// the client that owns the connection and can be used to create senders and receivers
275
272
static ServiceBusClient client;
276
273
277
274
// the processor that reads and processes messages from the queue
278
275
static ServiceBusProcessor processor;
279
276
```
280
-
3. Replace code in the `Main` method with the following code. See code comments for details about the code. Here are the important steps from the code. See code comments for more details.
277
+
3. Add the following methods to the `Program` class to handle received messages and any errors.
4. Replace code in the `Main` method with the following code. See code comments for details about the code. Here are the important steps from the code. See code comments for more details.
281
298
Here are the important steps from the code:
282
299
1. Creates a [ServiceBusClient](/dotnet/api/azure.messaging.servicebus.servicebusclient) object using the primary connection string to the namespace.
283
300
1. Invokes the [CreateProcessor](/dotnet/api/azure.messaging.servicebus.servicebusclient.createprocessor) method on the [ServiceBusClient](/dotnet/api/azure.messaging.servicebus.servicebusclient) object to create a [ServiceBusProcessor](/dotnet/api/azure.messaging.servicebus.servicebusprocessor) object for the specified Service Bus queue.
0 commit comments