# Message queue

A step of the [Cloud application](https://gradus.kazet.blog/tree/cloud-application) tree on Gradus, in the Data & storage area: DB, cache, queues.

Page: https://gradus.kazet.blog/tree/cloud-application/step/message-queue

Add a message queue or event stream so services can communicate asynchronously instead of calling one another directly.

Usually comes after: [Data access layer & seed data](https://gradus.kazet.blog/tree/cloud-application/step/data-access-layer).

Leads to: [Stream processing](https://gradus.kazet.blog/tree/cloud-application/step/stream-processing).

## Prompt for your AI assistant

```
Add a message queue (such as SQS, RabbitMQ or Kafka) and refactor one direct service-to-service call into a published event and a subscribing consumer.
```

Every step of the tree: https://gradus.kazet.blog/tree/cloud-application/llms.txt
