amazon-sqs

AWS Lambda not removing messages from the queue

守給你的承諾、 提交于 2021-01-23 15:18:53
问题 I am triggering a Lambda function from an SQS event with the following code: @Override public Void handleRequest(SQSEvent sqsEvent, Context context) { for (SQSMessage sqsMessage : sqsEvent.getRecords()) { final String body = sqsMessage.getBody(); try { //do stuff here } catch (Exception ex) { //send to DLQ } } return null; } The "do stuff" is calling another Lambda function with the following code: private final AWSLambda client; private final String functionName; public LambdaService

AWS Lambda not removing messages from the queue

久未见 提交于 2021-01-23 15:08:11
问题 I am triggering a Lambda function from an SQS event with the following code: @Override public Void handleRequest(SQSEvent sqsEvent, Context context) { for (SQSMessage sqsMessage : sqsEvent.getRecords()) { final String body = sqsMessage.getBody(); try { //do stuff here } catch (Exception ex) { //send to DLQ } } return null; } The "do stuff" is calling another Lambda function with the following code: private final AWSLambda client; private final String functionName; public LambdaService

Laravel - Job dispatched on one server, handled on another

守給你的承諾、 提交于 2021-01-22 14:37:05
问题 I'm working on the logging aspect of a Laravel application, amd was planning to send the data to an SQS for retrieval at a later time. However, I would like to dispatch the job from my production server to the AWS Queue, but then have a Queue working on a separate Logging server which listens to the Queue. I understand how to setup the Queue worker to listen to the Queue, however, Laravel's Jobs are self handling. So when the worker on the Logging server retrieves the message from SQS, it

How to get messages receive count in Amazon SQS using boto library in Python?

孤者浪人 提交于 2020-12-29 04:13:06
问题 I am using boto library in Python to get Amazon SQS messages. In exceptional cases I don't delete messages from queue in order to give a couple of more changes to recover temporary failures. But I don't want to keep receiving failed messages constantly. What I would like to do is either delete messages after receiving more than 3 times or not get message if receive count is more than 3. What is the most elegant way of doing it? 回答1: There are at least a couple of ways of doing this. When you

How to get messages receive count in Amazon SQS using boto library in Python?

旧时模样 提交于 2020-12-29 04:10:51
问题 I am using boto library in Python to get Amazon SQS messages. In exceptional cases I don't delete messages from queue in order to give a couple of more changes to recover temporary failures. But I don't want to keep receiving failed messages constantly. What I would like to do is either delete messages after receiving more than 3 times or not get message if receive count is more than 3. What is the most elegant way of doing it? 回答1: There are at least a couple of ways of doing this. When you

How to get messages receive count in Amazon SQS using boto library in Python?

两盒软妹~` 提交于 2020-12-29 04:10:18
问题 I am using boto library in Python to get Amazon SQS messages. In exceptional cases I don't delete messages from queue in order to give a couple of more changes to recover temporary failures. But I don't want to keep receiving failed messages constantly. What I would like to do is either delete messages after receiving more than 3 times or not get message if receive count is more than 3. What is the most elegant way of doing it? 回答1: There are at least a couple of ways of doing this. When you

How to intercept a new file on S3 using Laravel Queues?

∥☆過路亽.° 提交于 2020-12-08 01:42:51
问题 I have an S3 bucket, mybucket , and I want to execute something when a new file is copied into that bucket. For the notifications, I want to use an SQS queue, notifiqueue , because my goal is to access that queue with Laravel Since I am creating my infrastructure in CloudFormation , the resources are created like this: NotificationQueue: Type: AWS::SQS::Queue Properties: VisibilityTimeout: 120 QueueName: 'NotificationQueue' DataGateBucket: Type: AWS::S3::Bucket Properties: AccessControl:

How to intercept a new file on S3 using Laravel Queues?

核能气质少年 提交于 2020-12-08 01:38:57
问题 I have an S3 bucket, mybucket , and I want to execute something when a new file is copied into that bucket. For the notifications, I want to use an SQS queue, notifiqueue , because my goal is to access that queue with Laravel Since I am creating my infrastructure in CloudFormation , the resources are created like this: NotificationQueue: Type: AWS::SQS::Queue Properties: VisibilityTimeout: 120 QueueName: 'NotificationQueue' DataGateBucket: Type: AWS::S3::Bucket Properties: AccessControl:

How to intercept a new file on S3 using Laravel Queues?

独自空忆成欢 提交于 2020-12-08 01:37:12
问题 I have an S3 bucket, mybucket , and I want to execute something when a new file is copied into that bucket. For the notifications, I want to use an SQS queue, notifiqueue , because my goal is to access that queue with Laravel Since I am creating my infrastructure in CloudFormation , the resources are created like this: NotificationQueue: Type: AWS::SQS::Queue Properties: VisibilityTimeout: 120 QueueName: 'NotificationQueue' DataGateBucket: Type: AWS::S3::Bucket Properties: AccessControl:

How to turn off the pager for AWS CLI return value?

巧了我就是萌 提交于 2020-12-02 05:55:07
问题 I am attempting to utilize the AWS CLI along with a for loop in bash to iteratively purge multiple SQS message queues. The bash script works almost as intended, the problem I am having is with the return value each time the AWS CLI sends a request. When the request is successful, it returns an empty value and opens up an interactive pager in the command line. I then have to manually type q to exit the interactive screen and allow the for loop to continue to the next iteration. This becomes