azure-spring-boot/azure-spring-boot-samples/azure-servicebus-spring-boo...
Yunge Zhu 99174e518c
add telemetry in application insights (#322)
2018-05-03 19:54:10 -07:00
..
src/main add telemetry in application insights (#322) 2018-05-03 19:54:10 -07:00
README.md support build samples with gradle (#273) 2018-02-27 16:54:05 +08:00
build.gradle support build samples with gradle (#273) 2018-02-27 16:54:05 +08:00
pom.xml change azure-support to azure-spring-boot and change package name spr… (#200) 2017-09-28 16:16:33 +08:00

README.md

Overview

This sample project demonstrates how to use Service Bus via Spring Boot Starter azure-servicebus-spring-boot-starter.

Prerequisites

Quick Start

Create Service Bus on Azure

  1. Go to Azure portal and create the service by following this link.
  2. Mark down the Primary Connection String.
  3. In the Overview blade, create queue and topic. Mark down your queue name and topic name.
  4. Click your created topic, add subscription in the Subscriptions blade. Mark down your subscription name.

Config the sample

  1. Navigate to src/main/resources and open application.properties.
  2. Fill in the connection-string, queue-name,topic-name and subscription-name.

Run the sample

  1. Change directory to folder azure-servicebus-spring-boot-sample.

  2. Run below commands.

    • Use Maven

      mvn package
      java -jar target/azure-servicebus-spring-boot-sample-0.0.1-SNAPSHOT.jar
      
    • Use Gradle

      gradle bootRepackage
      java -jar build/libs/azure-servicebus-spring-boot-sample-0.0.1-SNAPSHOT.jar
      

More usage

Please check the following table for reference links of detailed Service Bus usage.

Type Reference Link
Queues https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-queues
Topics https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-topics-subscriptions
Subscriptions https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-java-how-to-use-topics-subscriptions