# gRPC vs Message Queues Usecases

Sometimes, when writing microservices, we often come across a dilema: **Whether to use gRPC** and **message queues**. I, literaly, have been biting the bullet making a decision about which tech to use. After a some research I compiled some 2 cents on this.

**gRPC** and **message queues** are both powerful tools that can be used to facilitate communication between different services or applications, but they are designed for different use cases:

gRPC is a high-performance, open-source framework for building remote procedure call (RPC) APIs. It is designed for use cases where low-latency and high-throughput communication is required. It is particularly well-suited for use cases such as:

* Microservices that need to communicate with each other
    
* Real-time streaming of data between services
    
* High-performance distributed systems
    
* Mobile and web applications that need to communicate with a backend
    

On the other hand, message queues are designed for asynchronous and decoupled communication between services or applications. They are particularly well-suited for use cases such as:

* Event-driven architectures, where services need to publish and subscribe to events
    
* Data streaming and processing, where services need to consume and produce large volumes of data
    
* Distributed systems, where services need to be loosely coupled and can operate independently
    
* Communication between services that are deployed in different locations or on different infrastructure
    

In summary, **#gRPC** is best for low-latency, high-throughput communication between services that need to operate in real-time, while **#messagequeues** are best for asynchronous, decoupled communication between services that need to handle large volumes of data. I hope you will now choose a good communication technology to suite your needs
