#When to use microservices over queues?
1 messages · Page 1 of 1 (latest)
There's some overlap in functionality. One difference is that messages from @nestjs/microservices can use enhancers (guards, interceptors, exception filters...), but bull queue processors can't. Also you would generally use bull queues inside a single service logical service. But the only actual difference is semantics - bull is for "job queues" and microservice transports based on brokers are for "message queues".
Could you please give a few good use case examples for each approach?
bull is great when you want to balance load within a single service (say, you have a service that generates image thumbnails, you put each new job to a queue and let it process then one by one), on the other hand, you'd use microservices approach to pass messages to and query data from other services in the system.