Asynchronous

Since reactive microservices use message passing, you have to process message asynchronously. This doesn't mean you have to use asynchronous crates such as tokio or futures. But it means no one message can block the service; every message is processed in a short period of time and if the service has to perform a long task it should do it as a background task and inform the thread issued that task about the result by sending a message with that result. To achieve this behavior, you can use multiple threads without asynchronous code. But what about using asynchronous code for reactive microservices?

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.8.8