# Message Queue

## SQS

![](https://1374779285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFW3x2aqEO8GF2kr3VU%2Fuploads%2FnbwNU453PR9o2bxJBviT%2Fscreenshot-www.udemy.com-2023.08.15-01_03_40.png?alt=media\&token=74a18a7e-bf1d-4c4c-8935-e7f4dfb3157a)

* Default retention of message is 4 days, maximum 14 days
* Maximum message size is 256 Kb
* Message visibility timeout that become invisible to other customers default is 30 seconds, maximum is 900 seconds
* FIFO should be used if ordering of the message is important

### Dead letter queue

* To capture all messages that can't be processed, the message failed will be falled into dead-letter-queue

## SNS

![](https://1374779285-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFW3x2aqEO8GF2kr3VU%2Fuploads%2Fx2Iqz6t1xUsVRJBntnhr%2Fscreenshot-www.udemy.com-2023.08.15-01_28_41.png?alt=media\&token=7fd96e57-ee0f-45f3-9f5d-b6618fde97ac)

* The message can be received by multiple services
* 100,000 topics limit
* Can be send to the specific service by using message filtering based on the message content

