Features of SQS

Learn about the different features of the queues and messages in Amazon SQS.

Now that we have an understanding of SQS and the different types of queues we can create using this service, let’s look into the features it offers.

Polling

Polling is the process through which messages are received from a SQS queue. In this process, the consumers query the queue, whenever they are available, in order to receive messages from the queue. Amazon SQS supports short and long polling. These models provide different trade-offs in terms of latency, throughput, and cost, allowing us to choose the model that best fits our application’s requirements.

Short polling

In this method, only a subset of the servers are queried when the SQS queue receives a message retrieval request. SQS sends an empty response immediately, in case it doesn’t find any messages in the queue. Due to this, there is a chance we might not receive messages using short polling. However, if our queue contains less than 1000 messages, we’ll be able to receive these messages with short polling. Also, if we keep sending message retrieval requests to our queue, all available servers are queried to send back a response.

Get hands-on with 1200+ tech skills courses.