Skip to content

Latest commit

 

History

History
 
 

azure-servicebus-spring-boot-sample

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 

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