Hi All,

For message retrieval from the Amazon SQS queue will depend on the short
polling or long polling. For this, we can set a time limit to wait when
polling queues for messages. Short polling is when we make a request to
receive messages without setting the ReceiveMessageWaitTimeSeconds property
for the queue (that means 0 sec). Setting the ReceiveMessageWaitTimeSeconds
property to up to 20 seconds (20 seconds is the maximum wait time) will
cause the call to wait up to 20 seconds for a message to appear on the
queue before returning.  If there is a message on the queue, then the call
will return immediately with the message this may be all of the messages
(up to maximum number that is 10), or a subset of the messages. SQS short
polling returns immediately even if the queue being polled is empty, SQS
long polling doesn’t return a response until a message arrives in the
queue, or the long poll times out. So, the advantage of using long polling
is to eliminate a large number of empty polls and false empty responses.

So, To consume messages from the Amazon SQS inbound Endpoint Long polling
is better than short polling.

Thanks,

Biruntha

Associate Software Engineer
WSO2
Email : [email protected]
Linkedin : https://lk.linkedin.com/in/biruntha
Mobile : +94773718986

On Tue, Sep 6, 2016 at 11:01 AM, Biruntha Gnaneswaran <[email protected]>
wrote:

> Hi All,
>
> I have herewith attached [1] to my milestone plan for the Amazon SQS
> Inbound Endpoint.
>
> Please let me know, if there's anything else I missed.
>
> [1] - https://docs.google.com/spreadsheets/d/
> 1Z9kTl8CcWx24fePd5CZHiH4A8eS6F5g_jQGRW7PnZCY/edit#gid=0
>
>
> Thanks,
>
> Biruntha
>
> Associate Software Engineer
> WSO2
> Email : [email protected]
> Linkedin : https://lk.linkedin.com/in/biruntha
> Mobile : +94773718986
>
> On Thu, Sep 1, 2016 at 10:57 AM, Biruntha Gnaneswaran <[email protected]>
> wrote:
>
>> Hi All,
>>
>> Architecture diagram :
>>
>>
>> ​
>> ​Thanks,
>>
>> Biruntha
>>
>> Associate Software Engineer
>> WSO2
>> Email : [email protected]
>> Linkedin : https://lk.linkedin.com/in/biruntha
>> Mobile : +94773718986
>>
>> On Thu, Sep 1, 2016 at 10:31 AM, Biruntha Gnaneswaran <[email protected]>
>> wrote:
>>
>>> Hi All,
>>>
>>> I have planned to implement Amazon SQS inbound endpoint to listen and
>>> consume messages from Amazon SQS. The behaviour of this inbound endpoint is
>>> polling.
>>>
>>> Architecture diagram - [1].
>>>
>>> Amazon Simple Queue Service (Amazon SQS) offers reliable and scalable
>>> hosted queues for storing messages. It is a distributed queue system that
>>> enables quickly and reliably queue messages.
>>>
>>> *Characteristic of Amazon SQS queue :*
>>>
>>>    -
>>>
>>>    The messages will be available up to maximum 14 days in the queue,
>>>    provided that no delete action is performed.
>>>    -
>>>
>>>    The order of the messages will not be guaranteed.
>>>    -
>>>
>>>    The messages are highly available as the SQS will keep the redundant
>>>    messages across the multiple Amazon SQS servers.
>>>
>>>
>>>    -
>>>
>>>    The message retrievable will depend on the short polling or long
>>>    polling.
>>>    -
>>>
>>>       *Short Polling: *In the short polling, the Amazon SQS will sample
>>>       subset of servers from the available SQS servers to retrieve the 
>>> messages.
>>>       Due to this, to get all the messages we need to poll multiple times. 
>>> This
>>>       technique will give empty responses to the receivers even though the 
>>> queue
>>>       doesn’t contain any messages.
>>>       -
>>>
>>>       *Long Polling:* In the long polling, the Amazon SQS will poll all
>>>       the servers to get the messages. So, with less number of calls to 
>>> make to
>>>       SQS to get the messages. In this mechanism, the queue will not send 
>>> any
>>>       response back to the receiver if there are no messages available in 
>>> the
>>>       queue.
>>>
>>>
>>>    -
>>>
>>>    Amazon SQS won’t delete the messages after consuming it. The
>>>    consumer has to perform delete message operation after consuming it by
>>>    setting “*visibility timeout*“*, *which is a time period during
>>>    which the SQS hide the messages to consume.
>>>
>>>
>>> Your comments and suggestions are highly appreciated.
>>> [1] -
>>> *https://docs.google.com/document/d/1tuRUZUDQyonEBIHyocxTIkZu4nERD99TY_pyw35oavs/edit*
>>> <https://docs.google.com/document/d/1tuRUZUDQyonEBIHyocxTIkZu4nERD99TY_pyw35oavs/edit>
>>>
>>>
>>> Thanks,
>>> Biruntha
>>>
>>> Associate Software Engineer
>>> WSO2
>>> Email : [email protected]
>>> Linkedin : https://lk.linkedin.com/in/biruntha
>>> Mobile : +94773718986
>>>
>>
>>
>
_______________________________________________
Architecture mailing list
[email protected]
https://mail.wso2.org/cgi-bin/mailman/listinfo/architecture

Reply via email to