{"id":2269,"date":"2019-08-22T11:37:39","date_gmt":"2019-08-22T11:37:39","guid":{"rendered":"https:\/\/www.testpreptraining.com\/tutorial\/?page_id=2269"},"modified":"2022-03-04T07:38:31","modified_gmt":"2022-03-04T07:38:31","slug":"sqs","status":"publish","type":"page","link":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/","title":{"rendered":"Understanding SQS"},"content":{"rendered":"\n<p>Here, we will create an understanding of SQS.<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>\u00a0Reliable, scalable, hosted queue service for sending, storing and retrieving messages.<\/li><li>Queue act as a buffer between sender and receiver.<\/li><li>256kb message, >256kb managed using SQS extended client library which uses S3, deliver message atleast once, not FIFO, can be create in<\/li><li>any region, retained for 14 days<\/li><li>can be sent and read simultaneously<\/li><li>long polling reduces frequent polling (wait 20 secs if queue empty)<\/li><li>First 1 million request free, $0.50 next 1 million + data transfer charges, SQS queues can be scaled.<\/li><li>Amazon SQS Architectures <ul><li>Priority (2 queues High\/Low) <\/li><\/ul><ul><li>Fanout (SNS topic\/multiple SQS queues for parallel processing) <\/li><\/ul><\/li><li>This supports both standard and FIFO queues.<\/li><li>Standard Queue <ul><li>Unlimited Throughput <\/li><\/ul><ul><li>At-Least-Once Delivery <\/li><\/ul><ul><li>Best-Effort Ordering <\/li><\/ul><\/li><li>FIFO Queue <ul><li>High Throughput <\/li><\/ul><ul><li>Exactly-Once Processing <\/li><\/ul><ul><li>First-In-First-Out Delivery <\/li><\/ul><\/li><\/ul>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Distributed Queues<\/strong><\/h4>\n\n\n\n<p>3 parts in a distributed messaging system<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>the components of distributed system<\/li><li>queue (distributed on Amazon SQS servers),<\/li><li>messages in the queue.<\/li><\/ul>\n\n\n\n<p>Below, system send messages to queue and receive messages from queue. The queue (holds messages A through E) redundantly stores the messages across multiple Amazon SQS servers.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"624\" height=\"266\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image-193.png\" alt=\"Understanding SQS\" class=\"wp-image-2345\"\/><\/figure>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Message Lifecycle <\/strong><\/h4>\n\n\n\n<div class=\"wp-block-image\"><figure class=\"aligncenter\"><img loading=\"lazy\" decoding=\"async\" width=\"443\" height=\"400\" src=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image-194-443x400.png\" alt=\"Understanding SQS\" class=\"wp-image-2346\" srcset=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image-194-443x400.png 443w, https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image-194.png 624w\" sizes=\"auto, (max-width: 443px) 100vw, 443px\" \/><\/figure><\/div>\n\n\n\n<ol class=\"wp-block-list\"><li>A producer or component 1 sends message A to a queue, and the message distribute across the Amazon SQS servers redundantly.<\/li><li>When a consumer or component 2 is ready to process messages, it consumes messages from the queue, and message A returns. While message A is being processed, it remains in the queue and isn&#8217;t returned to subsequent receive requests for the duration of the visibility timeout.<\/li><li>The consumer or component 2 deletes message A from the queue to prevent the message from being received and processed again when the visibility timeout expires.<\/li><\/ol>\n\n\n\n<h4 class=\"wp-block-heading\"><strong>Best Practices<\/strong><\/h4>\n\n\n\n<ul class=\"wp-block-list\"><li>Processing Messages in a Timely Manner<\/li><li>Handling Request Errors<\/li><li>Setting Up Long Polling<\/li><li>Capturing Problematic Messages<\/li><li>Setting Up Dead-Letter Queue Retention<\/li><li>Avoiding Inconsistent Message Processing<\/li><li>Implementing Request-Response Systems<\/li><\/ul>\n\n\n\n<p>To reduce costs, batch message actions:<\/p>\n\n\n\n<ul class=\"wp-block-list\"><li>use the Amazon SQS batch API actions<\/li><li>use long polling together with buffered asynchronous client.<\/li><\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Here, we will create an understanding of SQS. \u00a0Reliable, scalable, hosted queue service for sending, storing and retrieving messages. Queue act as a buffer between sender and receiver. 256kb message, >256kb managed using SQS extended client library which uses S3, deliver message atleast once, not FIFO, can be create in any region, retained for 14&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":2084,"menu_order":53,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"footnotes":""},"categories":[2],"tags":[7,376,434],"class_list":["post-2269","page","type-page","status-publish","hentry","category-amazon-aws","tag-aws","tag-aws-devops","tag-sqs"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.1 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Understanding SQS - AWS Testprep Training Tutorials<\/title>\n<meta name=\"description\" content=\"Understanding SQS as a reliable, hosted queue service for sending, storing, and retrieving messages. Try Free test Now!\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding SQS - AWS Testprep Training Tutorials\" \/>\n<meta property=\"og:description\" content=\"Understanding SQS as a reliable, hosted queue service for sending, storing, and retrieving messages. Try Free test Now!\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/\" \/>\n<meta property=\"og:site_name\" content=\"Testprep Training Tutorials\" \/>\n<meta property=\"article:modified_time\" content=\"2022-03-04T07:38:31+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image-193.png\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/\",\"name\":\"Understanding SQS - AWS Testprep Training Tutorials\",\"isPartOf\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\"},\"datePublished\":\"2019-08-22T11:37:39+00:00\",\"dateModified\":\"2022-03-04T07:38:31+00:00\",\"description\":\"Understanding SQS as a reliable, hosted queue service for sending, storing, and retrieving messages. Try Free test Now!\",\"breadcrumb\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AWS Certified DevOps Engineer Professional\",\"item\":\"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Understanding SQS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#website\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"name\":\"Testprep Training Tutorials\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#organization\",\"name\":\"Testprep Training\",\"url\":\"https:\/\/www.testpreptraining.ai\/tutorial\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"contentUrl\":\"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png\",\"width\":583,\"height\":153,\"caption\":\"Testprep Training\"},\"image\":{\"@id\":\"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Understanding SQS - AWS Testprep Training Tutorials","description":"Understanding SQS as a reliable, hosted queue service for sending, storing, and retrieving messages. Try Free test Now!","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/","og_locale":"en_US","og_type":"article","og_title":"Understanding SQS - AWS Testprep Training Tutorials","og_description":"Understanding SQS as a reliable, hosted queue service for sending, storing, and retrieving messages. Try Free test Now!","og_url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/","og_site_name":"Testprep Training Tutorials","article_modified_time":"2022-03-04T07:38:31+00:00","og_image":[{"url":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-content\/uploads\/2019\/08\/image-193.png"}],"twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/","url":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/","name":"Understanding SQS - AWS Testprep Training Tutorials","isPartOf":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website"},"datePublished":"2019-08-22T11:37:39+00:00","dateModified":"2022-03-04T07:38:31+00:00","description":"Understanding SQS as a reliable, hosted queue service for sending, storing, and retrieving messages. Try Free test Now!","breadcrumb":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/sqs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.testpreptraining.ai\/tutorial\/"},{"@type":"ListItem","position":2,"name":"AWS Certified DevOps Engineer Professional","item":"https:\/\/www.testpreptraining.ai\/tutorial\/aws-devops-engineer\/"},{"@type":"ListItem","position":3,"name":"Understanding SQS"}]},{"@type":"WebSite","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#website","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","name":"Testprep Training Tutorials","description":"","publisher":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.testpreptraining.ai\/tutorial\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#organization","name":"Testprep Training","url":"https:\/\/www.testpreptraining.ai\/tutorial\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/","url":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","contentUrl":"https:\/\/www.testpreptraining.com\/tutorial\/wp-content\/uploads\/2020\/07\/tpt-logo-6.png","width":583,"height":153,"caption":"Testprep Training"},"image":{"@id":"https:\/\/www.testpreptraining.ai\/tutorial\/#\/schema\/logo\/image\/"}}]}},"_links":{"self":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2269","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/comments?post=2269"}],"version-history":[{"count":8,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2269\/revisions"}],"predecessor-version":[{"id":51950,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2269\/revisions\/51950"}],"up":[{"embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/pages\/2084"}],"wp:attachment":[{"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/media?parent=2269"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/categories?post=2269"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.testpreptraining.ai\/tutorial\/wp-json\/wp\/v2\/tags?post=2269"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}