node.js - Most effective way to poll an Amazon SQS queue using Node -
my question short, think interesting:
i've queue amazon sqs service, , i'm polling queue every second. when there's message process message , after processing, go polling queue.
is there better way this?, sort of trigger? or approach best in opinion, , why.
thanks!
yes there is: http://docs.aws.amazon.com/awssimplequeueservice/latest/sqsdeveloperguide/sqs-long-polling.html
you can configure sqs queues have "receive message wait time" , long polling.
so can set 10 seconds, , call come if have message or after 10 sec timeout expires. can continuously poll queue in scenario.
Comments
Post a Comment