sar
sar

Reputation: 99

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?

Upvotes: 0

Views: 1176

Answers (1)

RahulKumarShaw
RahulKumarShaw

Reputation: 4612

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

Upvotes: 1

Related Questions