amazon-sqs

How scale a Elasticbeanstalk application worker on based on messages from SQS?

早过忘川 提交于 2019-12-13 07:37:43
问题 I have a Scala application to do some heavy calculation based on customer_id, I'm putting customers id in SQS (Amazon Simple Queue Service), the application it is configured on ElastikBeansTalk to consume msg from SQS. I would like to scale my application based on message coming from SQS, the problem is my application is running as HTTP server and it return 200 code after finishing the calculation, which minimum takes 15min. SQS max timeout is 60 seconds, so after that, all msgs ended up in

SQS Size growing even though messages deleted is equal to messages received

谁都会走 提交于 2019-12-13 07:36:37
问题 What can be the reason for number of messages in a SQS queue increasing if the number of messaged deleted is equal to number of messages received? 回答1: From Available CloudWatch Metrics for Amazon SQS - Amazon Simple Queue Service: NumberOfMessagesDeleted: Amazon SQS emits the NumberOfMessagesDeleted metric for every successful deletion operation that uses a valid receipt handle, including duplicate deletions. NumberOfMessagesReceived: The number of messages returned by calls to the

BBC consumer SQS polling

微笑、不失礼 提交于 2019-12-13 05:43:45
问题 I need to poll and SQS queue using node js. I tried using bbc consumer npm library but some messages don’t get received by the consumer. Does anyone have a better solution to polling an SQS using node? 回答1: Use sqs-consumer it works great! 来源: https://stackoverflow.com/questions/50653227/bbc-consumer-sqs-polling

SQS distinguish between duplicate and failed/retry messages?

天大地大妈咪最大 提交于 2019-12-13 03:48:43
问题 I am writing an application in Lambda that is invoked by SQS messages. I would like to be able to tell the difference between an invocation resulting from a "duplicate" message vs one resulting from a previous failure/retry (both SQS and Lambda will retry in case of failure). Is the messageId the same for duplicate messages, or just the body? If they are different I might be able to track a messageId against a key from the body to identity duplicates. TIA. 回答1: Ideally, you would want to

How to stream data from Amazon SQS to files in Amazon S3

拥有回忆 提交于 2019-12-13 03:38:42
问题 How to quickly create mechanism that reads json data from Amazon SQS and saves it in avro files (may be other format) in s3 bucket, partitioned by date and value of given field in json message? 回答1: You can write an AWS Lambda function that gets triggered by a message being sent to an Amazon SQS queue. You are responsible for writing that code, so the answer is that it depends on your coding skill. However, if each message is processed individually, you will end up with one Amazon S3 object

Implement a scheduled gate between two SQS queues

喜你入骨 提交于 2019-12-13 03:22:22
问题 I have two SQS queues say queueA and queueB. queueA has subscribed to mutliple SNS topics and keeps getting messages. queueB is the one to actually process these messages. But my requirement is that this processing should happen everyday during a fixed period, say 9am to 6pm everyday. There is no way to control/schedule processing inside queueB in other words, queueB processes the messages as soon as it recieves. I want to have a gate/door sort of mechanism between queueA and queueB. This

map datatype in aws cli

冷暖自知 提交于 2019-12-13 02:09:47
问题 i am trying to add a message to queue in amazon aws sqs so i tried this root~# aws sqs send-message --queue-url "queue/url" --message-body "message with attribute" --message-attributes '{"Name": "somename", "Type":"String", "Value":"somevalue"}' bit it gives me this error 'unicode' object has no attribute 'keys' but if i remove the --message-attributes part from the command root~# aws sqs send-message --queue-url "queue/url" --message-body "message with attribute" then it works perfect http:/

Create CloudWatch alarm on multiple SQS queues

白昼怎懂夜的黑 提交于 2019-12-12 19:25:07
问题 Suppose I have N EC2 instances in auto-scaling group, each of them is polling M SQS queues. How would I create an alarm on cumulative ApproximateNumberOfMessagesVisible across all SQS queues if possible? 回答1: There is no cumulative count of the visible messages metric available as of now. Here is how you can solve it, Create a Lambda/ cron job that can poll the queues, get ApproximateNumberOfMessages on each queue and update the total messages to a custom Cloudwatch Metric. QueueAttributes:

Cannot delete AWS SQS message from Spark application running in EMR

…衆ロ難τιáo~ 提交于 2019-12-12 17:47:01
问题 I am running an Apache Spark application in AWS EMR cluster. The application retrieves messages from the AWS SQS, does some computations based on the message data and then deletes each message. I am running the EMR cluster in a VPC on a private subnet with a NAT instance. The problem that I am facing, is that I cannot delete the message. I am able to retrieve all messages and I am able to send messages, but I cannot delete them. I am using the following security on the EMR cluster EC2

How execute Spring integration flow in multiple threads to consume more Amazon SQS queue messages in parallel?

自作多情 提交于 2019-12-12 16:15:22
问题 need help I need to create multiple sqs queue consumers that execute in parallel, but i don't know how to achieve this using Sprint Integration I have the following architecture An Amazon SQS queue with 200k messages A Amazon stack with 5 EC2 instances, every instance with tomcat server running a Spring boot application with a Spring Integration flow that consume the messages of SQS using sqs-message-driven-channel-adapter from spring-integration-aws (https://github.com/spring-projects/spring