amazon-sqs

SQSlistener not receiving messages

雨燕双飞 提交于 2019-12-24 08:06:06
问题 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

AWS SQS JSON format when receiving message from SNS with Ruby SDK

北慕城南 提交于 2019-12-24 05:54:19
问题 I have an SQS queue which is subscribed to a SNS topic. When I publish a new notification to the topic, I use the following code (within a Sinatra app): jsonMessage = { "announcement" => { "first_name" => results['first_name'][:s], "last_name" => results['last_name'][:s], "loc_code" => results['location'][:s], "note" => params['note_content'] } } msgid = @announcments_topic.publish(jsonMessage.to_json, {subject: "Note Created", message_structure: 'json' }) When my queue listener picks up this

Why is ApproximateAgeOfOldestMessage in SQS not bigger than approx 5 mins

房东的猫 提交于 2019-12-24 03:34:09
问题 I am utilising spring cloud aws messaging ( 2.0.1.RELEASE ) in java to consume from an SQS queue. If it's relevant we use default settings, java 10 and spring cloud Finchley.SR2 , We recently had an issue where a message could not be processed due to an application bug, leading to an exception and no confirmation (deletion) of the message. The message is later retried (this is desirable) presumably after the visibility timeout has elapsed (again default values are in use), we have not

How to configure custom Spring Cloud AWS SimpleMessageListenerContainerFactory so it keeps working with @SqsListener

亡梦爱人 提交于 2019-12-23 16:50:32
问题 I am trying to get SpringCloud AWS SQS working with a custom SimpleMessageListenerContainerFactory so i can set timeouts and maxnumber of messages. Without the custom SimpleMessageListenerContainerFactory methods that are annotated with the @SqsListener nicely pickup messages that are in SQS. But when i try to configure a custom SimpleMessageListenerContainerFactory the annotation stops working. @Bean public SimpleMessageListenerContainerFactory simpleMessageListenerContainerFactory

AWS Lambda. Invoke with delay

时光毁灭记忆、已成空白 提交于 2019-12-23 15:44:54
问题 I need to build "tasks scheduler" with Amazon tools. Main problem that i need execute task once with huge delay (it may be a few hours or few weeks). I try to research how to build it with CloudWatch and Lambda function. As i understand - i need to use separate rule for one timeout execution. But AWS allow me only 100 rules/account. Probably i'm going wrong way and this tools not intended for my task. Also i tried SQS, but it did't allow me to set timeout more than 15 minutes. The simplest

Having a PHP script loop forever doing computing jobs from a queue system

耗尽温柔 提交于 2019-12-23 12:17:02
问题 Currently I have a perl script that runs forever on my server, checking a SQS for data to compute. This script has been running for about 6 months with no problems what so ever. So, now I want to switch over to PHP'S CLI, and have the script loop there forever. Mostly because I'm more familiar with PHP. Basicly, $i="forever"; while($i==="forever"){ doSomething(); sleep(10); } The script will do a shell_exec("/shell_script.sh"); that can take up to 2 hours to process. Will this trigger a max

amazon sqs :read message not in order

牧云@^-^@ 提交于 2019-12-23 03:15:16
问题 i would like to take messages from amazon sqs in the same order in which it is inserted into sqs ( first in first out model). Is their any way to implement it?? I am using zend php for programing. 回答1: Unordered message delivery is inherent in the design of SQS. You could try to work around it by numbering the messages and storing the out-of-order messages locally until the missing messages arrive, but its probably not worth the hassle. SQS is really a bit of an odd duck, it does what it says

amazon sqs :read message not in order

烈酒焚心 提交于 2019-12-23 03:15:08
问题 i would like to take messages from amazon sqs in the same order in which it is inserted into sqs ( first in first out model). Is their any way to implement it?? I am using zend php for programing. 回答1: Unordered message delivery is inherent in the design of SQS. You could try to work around it by numbering the messages and storing the out-of-order messages locally until the missing messages arrive, but its probably not worth the hassle. SQS is really a bit of an odd duck, it does what it says

Feeding Apache Spark Streaming from Amazon SQS?

时光总嘲笑我的痴心妄想 提交于 2019-12-22 05:13:26
问题 Spark can be fed in many ways as it is explained in the documentation (like Kafka, Flume, Twitter, ZeroMQ, Kinesis or plain old TCP sockets). Does anybody know how to feed Spark Streaming from Amazon SQS? 回答1: There's a github project called spark-sql-receiver. It's been uploaded to the maven repository with the groupId of com.github.imapi artifactId of spark-sqs-receiver_2.10. It's currently on version 1.0.1. By the looks of the github project, it's being actively maintained as well. The

SQS Messages Not Deleting

冷暖自知 提交于 2019-12-22 04:04:56
问题 I have a small set of messages in an SQS queue, that are not deleted even though a deletion request sent to the AWS endpoint returns with a 200 response. The messages are processed by my application fine, and the deletion request is sent fine too. I'm using the Java AWS SDK 1.3.6. Has anyone else experienced this problem? 回答1: Whoops - the queue was accidentally set to defaultVisibilityTimeout=0 . Changing this to a positive value fixed the problem. This still raises a few questions though: