amazon-sqs

Amazon Cloudwatch alarm not triggered

爱⌒轻易说出口 提交于 2019-12-22 03:24:26
问题 I have a cloudwatch alarm configured : Threshold : "GreaterThan 0" for 1 consecutive period, Period : 1 minute, Statistic : Sum The alarm is configured on top of AWS SQS NumberOfMessagesSent. The queue was empty and no messages were being published to it. I sent a message manually. I could see the spike in metric but state of alarm was still OK. I am a bit confused why this alarm is not changing its state even though all the conditions to trigger this are met. 回答1: I just overcame this

Spring Cloud - SQS - The specified queue does not exist for this wsdl version

非 Y 不嫁゛ 提交于 2019-12-22 02:05:22
问题 I am attempting to get spring cloud to work with messaging using auto configure. My properties file contains: cloud.aws.credentials.accessKey=xxxxxxxxxx cloud.aws.credentials.secretKey=xxxxxxxxxx cloud.aws.region.static=us-west-2 My Configuration class is as follows: @EnableSqs @ComponentScan @EnableAutoConfiguration public class Application { public static void main(String[] args) throws Exception { SpringApplication.run(Application.class, args); } } My Listener class: @RestController public

How can Akka streams be materialized continually?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-21 14:36:11
问题 I am using Akka Streams in Scala to poll from an AWS SQS queue using the AWS Java SDK. I created an ActorPublisher which dequeues messages on a two second interval: class SQSSubscriber(name: String) extends ActorPublisher[Message] { implicit val materializer = ActorMaterializer() val schedule = context.system.scheduler.schedule(0 seconds, 2 seconds, self, "dequeue") val client = new AmazonSQSClient() client.setRegion(RegionUtils.getRegion("us-east-1")) val url = client.getQueueUrl(name)

Efficient way to check whether SQS queue is empty

蓝咒 提交于 2019-12-21 08:32:10
问题 I have a SQS Queue from which messages are read by multiple hosts. I want to run some job (business logic) after all the messages in the queue have been processed. How can I check that the queue is empty? Yes, I can check for ApproximateNumberOfMessages and ApproximateNumberOfMessagesNotVisible queue attributes but these are approximate numbers. I want to stop my hosts polling for messages in the queue when there are no messages left and then run the required job. Any ideas? Thanks 回答1: You

How to use message queue over internet

杀马特。学长 韩版系。学妹 提交于 2019-12-21 05:36:09
问题 So basically we have a backend hosted in the cloud. This backend is composed of Web Servers (Django/Python), Databases (Postgresql), RabbitMQ, and Workers (Celery) We also have hardware components around the world. Those hardware components need to get things done from the backend. We were thinking of using RabbitMQ to store their jobs and using a polling mechanism from hardware components to get jobs to do. We saw that with Amazon SQS we can achieve this. They have a system allowing to get

How do I add permissions on an AWS SQS Queue?

六眼飞鱼酱① 提交于 2019-12-21 04:26:09
问题 With the following code, I can add a permission using my AWS account number but the queue does not receive any messages from SNS. AddPermissionRequest addPermissionRequest = new AddPermissionRequest(); addPermissionRequest.ActionName.Add("SendMessage"); addPermissionRequest.ActionName.Add("ReceiveMessage"); addPermissionRequest.QueueUrl = queueUrl; addPermissionRequest.Label = General.IpAddressAWSFriendly; addPermissionRequest.AWSAccountId.Add(AWS_ACCOUNT_ID); sqs.AddPermission

Invoke AWS Lambda SNS event only after SQS subscription on same topic has been processed

喜你入骨 提交于 2019-12-21 04:16:09
问题 I would like to implement an Amazon SNS topic which first delivers messages to a SQS queue that is a subscriber on the topic, and then executes an AWS Lambda function that is also a subscriber on the same topic. The Lambda function can then read messages from the SQS queue and process several of them in parallel (hundreds). My question is whether there is any way to guarantee that messages sent to the SNS topic would first be delivered to the SQS queue, and only then to the Lambda function?

Why do SqS messages sometimes remain in-flight on queue

随声附和 提交于 2019-12-20 09:09:21
问题 I'm using Amazon SQS queues in a very simple way. Usually, messages are written and immediately visible and read. Occasionally, a message is written, and remains In-Flight(Not Visible) on the queue for several minutes. I can see it from the console. Receive-message-wait time is 0, and Default Visibility is 5 seconds. It will remain that way for several minutes, or until a new message gets written that somehow releases it. A few seconds delay is ok, but more than 60 seconds is not ok. There a

Accessing local SQS service from another docker container using environment variables

巧了我就是萌 提交于 2019-12-20 07:10:58
问题 I have a flask application which needs to interact with an SQS service whenever an endpoint is hit. I'm mimicing the SQS service locally using docker image sukumarporeddy/sqs:fp whose base image is https://github.com/vsouza/docker-SQS-local with two more queues added in configuration. I need to access this service from another app which is run as app_service . These two services are run using docker-compose.yml file where I mentioned two services. app_service sqs_service While building the

Elastic Beanstalk SQSD Error on worker start

人走茶凉 提交于 2019-12-20 04:24:21
问题 I've deployed a nodejs worker. However whenever I try to start it, it gets red and this error is showned: ERROR Instance: i-6eef007a Module: AWSEBAutoScalingGroup ConfigSet: null Command failed on instance. Return code: 1 Output: Error occurred during build: Command 01-start-sqsd failed . I don't know if it's related, sometimes I get this error on the screen: IamInstanceProfile: The environment does not have an IAM instance profile associated with it. To improve deployment speed please