amazon-sqs

How do I add permissions on an AWS SQS Queue?

不打扰是莪最后的温柔 提交于 2019-12-03 13:51:42
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(addPermissionRequest); But, when I try to set the permission via a wildcard (*) for everybody: addPermissionRequest

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

点点圈 提交于 2019-12-03 13:46:30
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? The purpose of this is to scale to a large number of messages without having to execute the Lambda

Amazon SNS -> SQS message body

扶醉桌前 提交于 2019-12-03 13:06:27
I'm sending a message from an SNS topic to an SQS. When I'm checking the body of the SQS message on my client, the whole of the message metadata is being sent in the SQS body. I.E. if I'm sending a message "Hello World" from the topic, my client is receiving: BenFlowers { "Type" : "Notification", "MessageId" : "84102bd5-8890-4ed5-aeba-c15fafc926dc", "TopicArn" : "arn:aws:sns:eu-west-1:534706846367:HelloWorld", "Message" : "hello World", "Timestamp" : "2012-06-05T13:44:22.360Z", "SignatureVersion" : "1", "Signature" : "Qzh0qXhijBKylaFwc9PGE

Slow Performance of Amazon SQS compared with RabbitMQ

烈酒焚心 提交于 2019-12-03 12:50:55
I wanted to integrate a message queuing middle tier in my web application. I have tested Rabbitmq as well as Amazon SQS but find Amazon SQS is slow. I am getting 80 req/sec in Amazon SQS where I am getting 2000 req/sec in Rabbitmq. I am asking this Question because I am more interested Amazon SQS since I am using all the services of Amazon for my web app. Can anybody please tell me why this is so slow? Or if anybody has any good benchmark of Amazon SQS can you please share? Any help will be appriced. According to this article you can run RabbitMQ on Amazon AWS (EC2) and it will be faster and

Best practices for using Amazon SQS - Polling the queue

半世苍凉 提交于 2019-12-03 05:34:47
I'm designing a service for sending out emails for our eCommerce site (order confirmations, alerts etc...) The plan is to have a "SendEmail" method, that generates a chunk of XML representing the email to be sent, and sticks it on an Amazon SQS queue. My web app(s) and other applications will use this to "send" emails. I then require a way of checking the queue, and physically sending out the email messages. (I know how I'm going to be dispatching emails) I'm curious as to what the best way to "poll" the queue would be? Should I create a windows service, and use something like Quartz.net to

Amazon SQS Java SDK - cannot receive message attributes

♀尐吖头ヾ 提交于 2019-12-03 04:39:36
After posting a message with an attribute to SQS with the following code before sending it (and checking in SQS console to see if everything is posted correctly)... messageRequest.addMessageAttributesEntry( "attributeTest", new MessageAttributeValue() .withDataType("String") .withStringValue("attributeTest 123")); I cannot retrieve any of the message attributes in the message. All I see, as a result, is "0 attributes.". Reinspecting the message in Amazon SQS console, the message - and the attribute - are still there. // Message was previously checked in SQS console and contains // an attribute

How to use AWS SQS/SNS as a push notification queue for heavy processing tasks via PHP?

自古美人都是妖i 提交于 2019-12-03 02:57:16
I have a single server running on rackspace which is hosting a single PHP web app. The PHP web app will accept a form submission that then needs to perform a task based on the form field entries. The task (let's called it the generate metadata task) requires quite a lot of processing time. I was wondering how to allow the form submission to be a straightforward save to database and immediately show success page to user while running the generate metadata task in the background. I have installed "aws/aws-sdk-php": "~3.11" using composer into the same web app. My plan is initially this: code

Why do SqS messages sometimes remain in-flight on queue

戏子无情 提交于 2019-12-02 19:01:40
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 8 reader threads that are long polling always, so its not that something is not trying to read it, they

What is the difference between Amazon SNS and Amazon SQS?

偶尔善良 提交于 2019-12-02 13:46:50
I don't understand when I would use SNS versus SQS, and why are they always coupled together? Srikanth SNS is a distributed publish-subscribe system. Messages are pushed to subscribers as and when they are sent by publishers to SNS. SQS is distributed queuing system. Messages are NOT pushed to receivers. Receivers have to poll or pull messages from SQS . Messages can't be received by multiple receivers at the same time. Any one receiver can receive a message, process and delete it. Other receivers do not receive the same message later. Polling inherently introduces some latency in message

Moving from RabbitMQ to Amazon SQS [closed]

三世轮回 提交于 2019-12-02 11:23:06
Our startup is currently using RabbitMQ (with Python/Django ) for messaging queues, now we are planning to move to Amazon SQS for its high availability & their delayed queue feature. But I am reading on INTERNET everywhere that SQS is slow performing & also very cost effective, so is it wise decision to move to Amazon SQS or should to stick to RabbitMQ? And if we its good to stick with RabbitMQ, whats the alternative solution for "delayed queues"? I haven't had any problems with slow performance on SQS, but then again it maybe that the be the nature of my apps don't count on sub-millisecond