---
title: "Discussion on \"Microservices 101 with Node.js and RabbitMQ\" | Hashnode"
description: "Discussion on \"Microservices 101 with Node.js and RabbitMQ\". Implementation of a microservice architecture using Node.js and RabbitMQ to create an eCommerce platform"
url: "https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [Microservices 101 with Node.js and RabbitMQ](https://scanairobi.hashnode.dev/microservices-101-with-nodejs-and-rabbitmq?utm_source=hashnode&utm_medium=feed)

Implementation of a microservice architecture using Node.js and RabbitMQ to create an eCommerce platform

Aug 26, 2022 · 9 min read · scanairobi.hashnode.dev  
Updated Feb 24, 2023  
Read the article

-   [#nodejs](https://hashnode.com/tag/nodejs)
-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#rabbitmq](https://hashnode.com/tag/rabbitmq)
-   [#express](https://hashnode.com/tag/express)

## Written by

[Ondiek Elijah](https://hashnode.com/@Ondiek)

@Ondiek · Nairobi, Kenya

  
[View profile](https://hashnode.com/@Ondiek)

Software Engineer | Community Advocate

Python and JavaScript Developer

## Responses 3

Markdown supported · ⌘↵ to post

[Saravana Thiyagarajan](https://hashnode.com/@Saravana-Thiyagaraja)

[Feb 22, 2023](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/63f60f8e437bc8d091bd0154)

Hi, I am really new to micro-services & mongo DB but in relational databases like MySQL & postgres SQL. we have a topic called transactions if the failure happens in a set of queries while updating the database records we can roll back the changes but in this approach what will happen if something goes wrong on any of the services? how to handle those cases and how to handle any exceptions?

[Ondiek Elijah](https://hashnode.com/@Ondiek)

[Feb 24, 2023](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/63f60f8e437bc8d091bd0154#reply-63f8c1365ebda1e9aa53c150)

Transactions must be handled across multiple services in a microservices architecture. This can be accomplished through a distributed transaction coordinator or by implementing a saga pattern.

Regarding exceptions, each service must have error-handling mechanisms in place. This includes logging errors, retrying failed requests, and notifying relevant parties. In the case of Node.js and RabbitMQ, the AMQP protocol can implement reliable messaging between services. RabbitMQ includes features such as message acknowledgements and dead-letter queues to handle exceptions and failures.

[Saravana Thiyagarajan](https://hashnode.com/@Saravana-Thiyagaraja)

[Feb 24, 2023](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/63f60f8e437bc8d091bd0154#reply-63f8f5ed5ebda1e9aa53ca73)

[Ondiek Elijah](https://hashnode.com/@Ondiek) Yeap, thanks for responding. I think because I am new to micro-services for seems a bit hard to understand can you write a blog on building some real-world small CRUD applications with those error handling & re-trying the requests& web concurrency , it will more help full for a junior dev's like me

[Ondiek Elijah](https://hashnode.com/@Ondiek)

[Feb 25, 2023](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/63f60f8e437bc8d091bd0154#reply-63f9b9a5478545fd8f77c2e0)

[Saravana Sai](https://hashnode.com/@SaravanaSai) Sure thing; in the meantime, you might want to explore the many tutorials on YouTube.

[Asrorbek Shahobiddinov](https://hashnode.com/@asrorbek)

[Sep 14, 2022](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/6321912607b360723689d299)

Can you share github source code link ?

[Ondiek Elijah](https://hashnode.com/@Ondiek)

[Sep 14, 2022](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/6321912607b360723689d299#reply-632196285483096daa0aa9de)

[github.com/Dev-Elie/E-commerce-Microservice](https://github.com/Dev-Elie/E-commerce-Microservice)

[Hamiduzzaman Parvez](https://hashnode.com/@hamidparvez)

[Aug 29, 2022](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/630cb4d856df9e8e50252061)

I have a question, If there are too many concurrent request how it will handle the last inserted queue and process it? I think there is high chances of order juggling for example if A -> alice ,B->bob, C->charlie, D->deco, E->erik,F->faun 6 order request are in same micro seconds then there is a chance that request from deco receiving response from bob and all may have others response! Did you get my point?

[Ondiek Elijah](https://hashnode.com/@Ondiek)

[Aug 29, 2022](https://hashnode.com/posts/microservices-101-with-nodejs-and-rabbitmq/630861614d50fd71142c5c4e/comment/630cb4d856df9e8e50252061#reply-630ceac443d7308e3e327ccd)

Hi. I think I have got your question right. To answer that, please read these articles. Let me know if you still need more clarification.

1.  [medium.com/batc/rabbitmq-message-ordering-on-mult…](https://medium.com/batc/rabbitmq-message-ordering-on-multiple-consumers-6f484858f589#:~:text=RabbitMQ%20has%20a%20plugin%20for,will%20go%20the%20same%20queue.)
2.  [live.rabbitmq.com/queues.html](https://live.rabbitmq.com/queues.html)
