简体   繁体   中英

Java application with azure service bus

I have an audit service. other application will call that service for auditing purpose. my concern is all call to audit service to be queued in azure service bus to make sure fault tolerance.please help me with how to queue other service call to audit service.

Now that you already have considered using service bus, there is no concern about fault tolerance. That's the exactly feature of Azure Service Bus.

Let the other services send message to the queues and your audit service receive those messages to consume them in the order.

You could create queues using the Azure portal, PowerShell, CLI, or Resource Manager templates. You then send and receive messages using a QueueClient object.

To quickly learn how to create a queue, then send and receive messages to and from the queue, see the quickstarts for each method. For a more in-depth tutorial on how to use queues, see Get started with Service Bus queues .

For a working sample, see the BasicSendReceiveUsingQueueClient sample on GitHub.

Then if you concern fault tolerance about audit service,you could use ReceiveAndDelete mode. ReceiveAndDelete mode is the simplest model and works best for scenarios in which the application can tolerate not processing a message if a failure occurs.More details, please refer to this link .

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