SNS, SQS, Kinesis & ActiveMQ Flashcards
For standard queues, what is the default retention policy?
4 days
For standard queues, what is the maximum retention policy?
14 days
What is the max size limit of an SQS message?
256KB
Can we have duplicate messages in SQS?
Yes, it is at least once delivery
Will messages be in order?
It is best effort ordering
How do consumers get messages from a queue?
Consumers poll the queues and can receive a max of 10 messages at a a time
What is the main use case for SQS queues?
To decouple applications
What are 3 things to know about SQS encryption?
- Use in-flight encryption using HTTPS API
- At-rest encryption using KMS keys
- Client side encryption if the client wants to encrypt/decrypt
How do you control access to SQS?
Use IAM roles
When would I use SQS Queue Access Policies?
When you need cross account access
What is Message Visibility Timeout?
It is the time the consumer has to process the message before other consumers can see it again
What is the default Visibility Timeout?
30 seconds
How do you increase the default Visibility Timeout?
Use the ChangeMessageVisibility API
What is a Delay Queue?
It is a queue that prevents consumers seeing messages until a time has elapsed
What is the default time for Delay Queues?
It is 0 seconds - so they will see it straight away
What is the maximum time I can set in a Delay Queue?
15 minutes
How do I override the default time in a Delay Queue?
Use the DelaySeconds parameter
What is long polling?
It is when a consumer waits for messages in the queue
What is the advantage of long polling?
Reduces the amount of API calls your app makes to SQS
What can the wait time be for long polling?
It can be between 1 and 20 seconds, but 20 seconds is preferred
What are the 2 ways to enable Long Polling?
- At the queue level
- Via API using WaitTimeSeconds
What is the SQS Temporary Queue Client?
It allows you to leverage virtual queues instead of creating/deleting SQS queues
What are the 6 subscriber options for SNS?
- SQS
- HTTP/HTTPS
- Lambda
- Emails
- SMS Messages
- Mobile Notifications
What are the 3 encryption options for SNS?
- In-flight encryption using HTTPS API
- At-rest encryption using KMS keys
- Client side encryption if client wants to handle encrypt/decrypt
What is the SNS + SQS fan out strategy?
Its when you push once to SNS, receive in all SQS queues that are subscribers
Does a subscriber receive all messages from SNS?
If there is no Message Filtering setup, they will receive all messages
What is Kinesis used for?
It is for collecting, processing and analyzing real-time streaming data
What are the 4 types of Kinesis?
- Kinesis Data Streams
- Kinesis Data Firehose
- Kinesis Data Analytics
- Kinesis Video Streams
What 2 things make up a Record in Kinesis?
- Partition Key
- Data Blob
How big can a data blob be in a Kinesis Message?
Up to 1MB
How much can a shard process in Kinesis?
- 1 MB per second
- 1000 messages per second
Is the Kinesis Record the same when the Consumer picks it up?
It has an additional key, the Sequence Number, along with the Partition Key and the Data Blob
What are the 2 types of Kinesis Consumer?
- Shared
- Enhanced
How much can the shared consumer process?
2MB per second per shard - ALL consumers
How much can an enhanced consumer process?
2MB per second per shard per consumer
What is the default data retention in a Kinesis shard?
1 day
What is the max data retention in a Kinesis shard?
365 days
Can we delete Kinesis data after it is written?
No, its immutable
When Kinesis Firehouse performsBatch Writes, what are the 3 possible AWS destinations?
- AWS S3
- AWS RedShift
- AWS ElasticSearch
What is Kinesis Data Analytics used for?
To perform real-time analytics on Kinesis Streams using SQL
What is Amazon MQ?
It is a managed ApacheMQ