简体   繁体   中英

How to continuously pull messages from service bus queue by using spring boot java application

How to continuously pull messages from service bus queue. Like in aws we have:

spring-cloud-starter-aws-messaging

and a: Link to explain more

How to do similar thing in azure?

Same you can do in Azure as well.

You can create queues using the Azure portal , PowerShell , CLI , or Resource Manager templates . Then, send and receive messages using clients written in C# , Java , Python , and JavaScript .

Receive messages from a queue

Add a method named receiveMessages to receive messages from the queue. This method creates a ServiceBusProcessorClient for the queue by specifying a handler for processing messages and another one for handling errors. Then, it starts the processor, waits for few seconds, prints the messages that are received, and then stops and closes the processor

For more information you can refer this MS Document for Create a console project and Configure your application to use Service Bus

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM