amazon-sqs

Cloudformation template to create a role for SQS

我的未来我决定 提交于 2019-12-25 08:00:09
问题 I am trying to create a role with embedded policy using cloudformation template : { "AWSTemplateFormatVersion": "2010-09-09", "Resources": { "SQSRole": { "Type": "AWS::IAM::Role", "Properties": { "AssumeRolePolicyDocument": { "Version" : "2012-10-17", "Statement": [ { "Effect": "Allow", "Principal": { "Service": [ "sqs.amazonaws.com" ] }, "Action": [ "SQS:SendMessage", "SQS:ReceiveMessage", "SQS:DeleteMessage", "SQS:GetQueueUrl" ] } ] }, "Path": "/" } }, "RootInstanceProfile": { "Type": "AWS:

PubSub - How to add subscriber for each ElasticBeanstalk EC2 instance

▼魔方 西西 提交于 2019-12-25 01:35:28
问题 I have a simple key-value pair collection in my mongo database, it holds configuration details for my web-app and it's read by each EC2 instance started by the ElasticBeanstalk autoscaling (1-10 instances). Almost every JAXRS service endpoint causes a read from the mongo config collection and I want to stop reading values directly from the DB to lighten the load on the database. My plan is to read the value once, store it in an in-memory dictionary then use the value from the dictionary

AWS Beanstalk Worker can't start SQS daemon aws-sqsd

痞子三分冷 提交于 2019-12-25 01:28:31
问题 My target is using AWS Beanstalk, create application environment type 'Worker' which will handle heavy loading tasks, this worker based on our Rails application. I create AWS Beanstalk Worker Environment: Environment tier: Ruby, 1.9.3 on 64bit Amazon Linux Environment type: single instance (i did try 64bit Amazon Linux 2014.03 v1.0.3 running Ruby 2.0 (Puma) with same failed result) After solving all issues with GEMS and database connection, i stuck on starting "aws-sqs" Queue client. It

Estimate SQS processing time and load

China☆狼群 提交于 2019-12-24 18:43:49
问题 I am going to use AWS SQS(regular queue, not FIFO) to process different client side metrics. I’m expect to have ~400 messages per second (worst case).My SQS message will contain S3 location of the file. I created an application, which will listen to my SQS Queue, and process messages from it. By process I mean: read SQS message -> take S3 location from that SQS message -> call S3 client -> Read that file -> Add a few additional fields —> Publish data from this file to AWS Kinesis Firehose.

How do I listen for AWS SQS messages in the background of my rails app? [closed]

限于喜欢 提交于 2019-12-24 15:27:50
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I want to asynchronously poll messages in the background of my rails application. Shoryuken doesn't work because I want my rails app to listen for incoming HTTP requests too. 回答1: Create an initializer in config/initializers like so: # Allows the thread to crash our app for us

How to get consistent CPU utilization on AWS

ぐ巨炮叔叔 提交于 2019-12-24 15:23:26
问题 I've now learnt that when I start a new EC2 instance it has a certain number of CPU credits due to which it's performance is high when it starts processing but gradually reduces over time as the credits run out. Past that point, the instance runs at which appears to be the baseline CPU utilisation rate. To numerate, when I started the EC2 instance (t2.nano), Cloudwatch reported around 80% CPU utilisation gradually decreasing down to 5%. Now I'm happy to use one of the better instance types

How to reduce connection latency with AWS SQS?

夙愿已清 提交于 2019-12-24 13:29:35
问题 When connecting to AWS SQS using AWS SDK, there seems to be a noticeable delay. It is not so important when starting up a service to consume messages since after a 3-7 second delay on the first connection, the messages start flowing at a good speed - BUT, when publishing messages it is a big problem. For example a user web request takes a few extra seconds to complete because of the connection to AWS is waiting to publish the message. This defeats the purpose of sending a message out in order

spring-cloud-aws Spring creates message header attribute not supported by SQS

柔情痞子 提交于 2019-12-24 13:20:05
问题 I'm using Spring Cloud AWS messaging to send/receive messages using SQS. My code looks like this: @SpringBootApplication @Import(MessagingConfig.class) public class App { public static void main(String[] args) { SpringApplication.run(App.class, args); } } @Configuration public class MessagingConfig { @Bean public QueueMessagingTemplate queueMessagingTemplate(AmazonSQS amazonSqs, ResourceIdResolver resourceIdResolver) { return new QueueMessagingTemplate(amazonSqs, resourceIdResolver); } } The

SQSlistener not receiving messages

╄→尐↘猪︶ㄣ 提交于 2019-12-24 08:07:16
问题 I am able to send messages to SQS queue from my springboot but not able to receive using sqslistener annotation, can someone help? public void send(String message) { queueMessagingTemplate.convertAndSend("test-queue", MessageBuilder.withPayload(message).build()); } @SqsListener(value = "test-queue", deletionPolicy = SqsMessageDeletionPolicy.NEVER) public void receive(String message) { System.out.println("message: " + message); } I have verified send by goign to AWS console, i can see my

Check if SQS exists in AWS using .NET

半世苍凉 提交于 2019-12-24 08:07:06
问题 I'm able to successfully send messages to a queue in .NET using the AmazonSQSClient clientin the AWSSDK.SQS package. How can I check to see whether a specific queue exists, and if it doesn't create it? 回答1: You'd need to run a check using the AmazonSQSClient.GetQueueUrl (string) method, where the string is the queue name. If the queue doesn't exist, it throws QueueDoesNotExistException . For you to do what you want, you'd need to catch the exception, and then create the queue using that name.