We're gonna implement the RPC (remote procedure call) pattern in Nodejs, using 2 different services: RPC_Client and RPC_Server, in order to understand the concepts of request-reply in RabbitMQ while creating a real case scenario.
Useful links:
---------------------
To learn the basics of RabbitMQ : • RabbitMQ basics (Including different excha...
Microservices using RabbitMQ (Message Queuing) : • NodeJs Microservices using RabbitMQ (Messa...
Implementing a request time out mechanism : • Promise.race() to handle request timeouts ...
Code repo : https://github.com/charbelh3/RabbitMQ...
TimeStamps:
----------------------
0:00- What is RPC
0:33- Explaining how it works
2:16- 2 Problems that we need to handle
3:09- The reply_to and correlation_id properties
3:52- Where is the exchange in all this??
4:42- Getting started with the RPC_Client application
5:42- Creating the RabbitMQClient class
7:28- Adding the Initialize message to our RabbitMQClient class
12:13- Creating the Consumer class in RPC_Client
16:00- Creating the Producer class in RPC_Client
21:14- Finalizing the RabbitMQClient class
23:28- Analyzing RabbitMQ monitoring management tool
25:13- Calling the /operate API
26:40- Problem when using the rabbitMQClient in different files
28:31- Fixing the first problem
29:26- Showing the problem with using new instances
30:00- Turning the RabbitMQClient class into a Singleton
34:00- Using the RabbitMQClient as a Singleton in our app
35:34- Planning for the RPC_Server
36:09- Modifying the code in the RPC_Server application
42:28- Creating the MessageHandler in RPC_Server
49:10- Analyzing RabbitMQ monitoring management tool
50:02- Adding the headers property to messages in RPC_Client
51:42- Consuming the RPC_Server response correctly
52:30- How to match the responses to their requests?
53:20- Adding the Event Emitter and emitting new messages from the Consumer
55:11- Subscribing to the event inside the Producer
56:48- Testing the events emitted by the consumer and received by the producer
57:41- How to return the response value that was emitted?
58:46- Wrapping the event with a Promise() to return the response value correctly
1:00:10- Explaining that you can produce errors as well from your RPC_Server and handle them in your RPC_Client
1:00:56- Message expiration time and request timeout
On this page of the site you can watch the video online RabbitMQ - RPC with NodeJs (request-reply pattern) with a duration of hours minute second in good quality, which was uploaded by the user Computerix 11 April 2023, share the link with friends and acquaintances, this video has already been watched 10,966 times on youtube and it was liked by 305 viewers. Enjoy your viewing!