You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The text was updated successfully, but these errors were encountered:
logicaleap
changed the title
Long polling on empty queue makes other pollers wait
SQS: Long polling on empty queue makes other pollers wait
Aug 3, 2022
The issue is with akka.stream.alpakka.sqs.impl.BalancingMapAsync
Setting SqsSourceSettings.withParallelRequests to a value other than 1 uses that class, which slows things down
This 'fixes' long polling, but causes other issues - message delays.
Even with parallelRequests=1, Alpakka seems to open two connections to AWS.
Calls ReceiveMessage, processes messages
Calls ReceiveMessage, ignores messages
Because request #2 ignores messages, they become invisible, and only available after visibilityTimeout expires.
At that point, the message is either received (by 1st connection), or ignored (by 2nd connection). If ignored, it triggers invisibility again.
Version
AkkaHttpVersion = "10.2.9"
AlpakkaVersion = "3.0.4"
Scenario
Create two SQS pollers, one per queue.
Config:
Queue A has 10,000 messages
Queue B has 0 messages
Message processing blocks for about 100ms.
Expected behaviour:
Both queues are polled concurrently and messages flow continuously when available
Actual behaviour
Workaround
The text was updated successfully, but these errors were encountered: