Skip to content

Commit a0f45d1

Browse files
authored
Merge pull request #301547 from TimShererWithAquent/us439212-08
Freshness Edit: Azure Messaging Service (8 of 10)
2 parents 770eda2 + 277ffb2 commit a0f45d1

23 files changed

+162
-120
lines changed

articles/service-bus-messaging/includes/service-bus-event-grid-prerequisites.md

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,18 @@ description: include file
44
author: spelluru
55
ms.service: azure-service-bus
66
ms.topic: include
7-
ms.date: 12/08/2022
7+
ms.date: 06/19/2025
88
ms.author: spelluru
99
ms.custom: "include file"
1010

1111
---
1212

1313
## Prerequisites
14+
1415
If you don't have an [Azure subscription](../../guides/developer/azure-developer-guide.md#understanding-accounts-subscriptions-and-billing), create a [free account](https://azure.microsoft.com/free/?ref=microsoft.com&utm_source=microsoft.com&utm_medium=docs&utm_campaign=visualstudio) before you begin.
1516

1617
## Create a Service Bus namespace
18+
1719
Follow instructions in this tutorial: [Quickstart: Use the Azure portal to create a Service Bus topic and subscriptions to the topic](../service-bus-quickstart-topics-subscriptions-portal.md) to do the following tasks:
1820

1921
- Create a **premium** Service Bus namespace.
@@ -22,17 +24,19 @@ Follow instructions in this tutorial: [Quickstart: Use the Azure portal to creat
2224
- Create a subscription to the topic. You need only one subscription in this tutorial, so no need to create subscriptions S2 and S3.
2325

2426
## Send messages to the Service Bus topic
25-
In this step, you use a sample application to send messages to the Service Bus topic you created in the previous step.
27+
28+
In this section, you use a sample application to send messages to the Service Bus topic you created in the previous section.
2629

2730
1. Clone the [GitHub azure-service-bus repository](https://github.com/Azure/azure-service-bus/) or download the zip file and extract files from it.
28-
2. In Visual Studio, go to the *\samples\DotNet\Azure.Messaging.ServiceBus\ServiceBusEventGridIntegrationV2* folder, and then open the *SBEventGridIntegration.sln* file.
29-
3. In the Solution Explorer window, expand the **MessageSender** project, and select **Program.cs**.
30-
4. Replace `<SERVICE BUS NAMESPACE - CONNECTION STRING>` with the connection string to your Service Bus namespace and `<TOPIC NAME>` with the name of the topic.
31+
1. In Visual Studio, go to the *\samples\DotNet\Azure.Messaging.ServiceBus\ServiceBusEventGridIntegrationV2* folder, and then open the *SBEventGridIntegration.sln* file.
32+
1. In the **Solution Explorer** window, expand the **MessageSender** project, and select **Program.cs**.
33+
1. Replace `<SERVICE BUS NAMESPACE - CONNECTION STRING>` with the connection string to your Service Bus namespace and `<TOPIC NAME>` with the name of the topic.
34+
35+
```csharp
36+
const string ServiceBusConnectionString = "<SERVICE BUS NAMESPACE - CONNECTION STRING>";
37+
const string TopicName = "<TOPIC NAME>";
38+
```
3139

32-
```csharp
33-
const string ServiceBusConnectionString = "<SERVICE BUS NAMESPACE - CONNECTION STRING>";
34-
const string TopicName = "<TOPIC NAME>";
35-
```
36-
5. Build and run the program to send 5 test messages (`const int numberOfMessages = 5;`) to the Service Bus topic.
40+
1. Build and run the program to send five test messages (`const int numberOfMessages = 5;`) to the Service Bus topic.
3741

38-
:::image type="content" source="./media/service-bus-event-grid-prerequisites/console-app-output.png" alt-text="Console app output":::
42+
:::image type="content" source="./media/service-bus-event-grid-prerequisites/console-app-output.png" alt-text="Screenshot shows the console app output, sending 5 messages.":::
Loading
-26.2 KB
Loading
-5.22 KB
Loading
-25.1 KB
Loading
-1.38 KB
Loading
20.6 KB
Loading
9.63 KB
Loading
Loading
-6.33 KB
Loading

0 commit comments

Comments
 (0)