diff --git a/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md b/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md index 83a788b4d..ee188eb66 100644 --- a/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md +++ b/servicebus/spring-cloud-azure-starter-integration-servicebus/multiple-namespaces/README.md @@ -4,21 +4,21 @@ This code sample demonstrates how to use Spring Integration for Azure Service Bu ## What You Will build - You will build an application that using Spring Integration for Azure Service Bus to send and receive messages from one queue in one Service Bus namespace and then forward them to another queue in another Service Bus namespace. ## What You Need -- [An Azure subscription](https://azure.microsoft.com/en-us/free/) -- [Terraform](https://www.terraform.io/) -- [IntelliJ IDEA](https://www.jetbrains.com/idea/download/#section=mac) -- [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli) -- JDK8 -- Maven +* [An Azure subscription](https://azure.microsoft.com/en-us/free/) +* [Terraform](https://www.terraform.io/) +* [IntelliJ IDEA](https://www.jetbrains.com/idea/download/#section=mac) +* [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli) +* JDK8 +* Maven ## Prevision Azure Resources required to run this sample. ### Authenticate using the Azure CLI + Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -51,6 +51,7 @@ You have logged in. Now let us find all the subscriptions to which you have acce ``` If you have more than one subscriptions, specify the subscription-id you want to use with command below: + ```shell az account set --subscription ``` @@ -71,9 +72,6 @@ terraform -chdir=./terraform apply ``` - - - It may take a few minutes to run the script. After successful running, you will see prompt information like below: ```shell @@ -94,12 +92,12 @@ AZURE_SERVICEBUS_NAMESPACE_01 = "${YOUR_SERVICEBUS_NAMESPACE_01}" AZURE_SERVICEBUS_NAMESPACE_02 = "${YOUR_SERVICEBUS_NAMESPACE_02}" AZURE_SERVICEBUS_NAMESPACE_03 = "${YOUR_SERVICEBUS_NAMESPACE_03}" - ``` You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. ### Export output to your local Environment + Running the command below to export environment values: ```shell @@ -108,22 +106,23 @@ Running the command below to export environment values: ## Run locally -In your terminal, run `mvn clean spring-boot:run`. - +In your terminal, run `mvn clean spring-boot:run` . ```shell # in the root directory of the sample mvn clean spring-boot:run ``` - ## Verify this sample + Send a POST request to service bus queue + ```shell $ curl -X POST http://localhost:8080/queues?message=hello ``` Verify in your app’s logs that a similar message was posted: + ```shell Message was sent successfully for queue1. New message received: 'hello' @@ -131,8 +130,8 @@ Message 'hello' successfully checkpointed Message was sent successfully for queue2. ``` - ## Clean up Resources + After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your Terraform project. @@ -141,6 +140,3 @@ To destroy the resources you created. ```shell terraform -chdir=./terraform destroy ``` - - - diff --git a/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md b/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md index 65ea05805..3e2fe3367 100644 --- a/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md +++ b/servicebus/spring-cloud-azure-starter-integration-servicebus/single-namespace/README.md @@ -3,20 +3,22 @@ This guide walks you through the process of accessing Servicebus Queues and Topics with Spring Integration. ## What You Will build + You will build an application that use Azure Servicebus Queues and Topics to send and receive messages withs [Spring Integration](https://spring.io/projects/spring-integration) APIs. ## What You Need -- [An Azure subscription](https://azure.microsoft.com/en-us/free/) -- [Terraform](https://www.terraform.io/) -- [IntelliJ IDEA](https://www.jetbrains.com/idea/download/#section=mac) -- [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli) -- JDK8 -- Maven +* [An Azure subscription](https://azure.microsoft.com/en-us/free/) +* [Terraform](https://www.terraform.io/) +* [IntelliJ IDEA](https://www.jetbrains.com/idea/download/#section=mac) +* [Azure CLI](https://docs.microsoft.com/cli/azure/install-azure-cli) +* JDK8 +* Maven ## Prevision Azure Resources required to run this sample. ### Authenticate using the Azure CLI + Terraform must authenticate to Azure to create infrastructure. In your terminal, use the Azure CLI tool to setup your account permissions locally. @@ -49,6 +51,7 @@ You have logged in. Now let us find all the subscriptions to which you have acce ``` If you have more than one subscriptions, specify the subscription-id you want to use with command below: + ```shell az account set --subscription ``` @@ -68,9 +71,6 @@ terraform -chdir=./terraform apply ``` - - - It may take a few minutes to run the script. After successful running, you will see prompt information like below: ```shell @@ -92,6 +92,7 @@ SERVICEBUS_NAMESPACE = "${YOUR_SERVICEBUS_NAMESPACE}" You can go to [Azure portal](https://ms.portal.azure.com/) in your web browser to check the resources you created. ### Export output to your local Environment + Running the command below to export environment values: ```shell @@ -100,8 +101,7 @@ Running the command below to export environment values: ## Run locally -In your terminal, run `mvn clean spring-boot:run`. - +In your terminal, run `mvn clean spring-boot:run` . ```shell mvn clean spring-boot:run @@ -110,23 +110,21 @@ mvn clean spring-boot:run ## Verify this sample 1. Send a POST request to service bus queue - $ curl -X POST http://localhost:8080/queues?message=hello 2. Verify in your app’s logs that a similar message was posted: - New message received: 'hello' Message 'hello' successfully checkpointed -3. Send a POST request to service bus topic +3. Send a POST request to service bus topic $ curl -X POST http://localhost:8080/topics?message=hello 4. Verify in your app’s logs that a similar message was posted: - New message received: 'hello' Message 'hello' successfully checkpointed ## Clean up Resources + After running the sample, if you don't want to run the sample, remember to destroy the Azure resources you created to avoid unnecessary billing. The terraform destroy command terminates resources managed by your Terraform project. @@ -135,7 +133,3 @@ To destroy the resources you created. ```shell terraform -chdir=./terraform destroy ``` - - - -