I've faced with an issue, when long polling doesn't work for messages with delay.
Use case:
1) Create some_test queue
2) Send message to this queue with DelaySeconds=5
3) Start long polling with the following parameters: WaitTimeSeconds=12 and Timeout=30
Result:
Receiver gets message on the second attempt.
Logs:
java -Dlogback.configurationFile=my_logback.xml -jar elasticmq-server-0.8.12.jar
19:34:06.730 [main] INFO org.elasticmq.server.Main$ - Starting ElasticMQ server (0.8.12) ...
19:34:07.647 [main] INFO o.e.rest.sqs.TheSQSRestServerBuilder - Started SQS rest server, bind address 0.0.0.0:9324, visible server address http://localhost:9324
[INFO] [01/13/2016 19:34:08.166] [elasticmq-akka.actor.default-dispatcher-3] [akka://elasticmq/user/IO-HTTP/listener-0] Bound to /0.0.0.0:9324
19:34:08.170 [main] INFO org.elasticmq.server.Main$ - === ElasticMQ server (0.8.12) started in 1791 ms ===
19:34:45.822 [elasticmq-akka.actor.default-dispatcher-3] DEBUG o.elasticmq.actor.QueueManagerActor - Looking up queue some_test, found?: false
19:34:45.843 [elasticmq-akka.actor.default-dispatcher-4] INFO o.elasticmq.actor.QueueManagerActor - Creating queue QueueData(some_test,MillisVisibilityTimeout(30000),PT0S,PT0S,2016-01-13T19:34:45.790+03:00,2016-01-13T19:34:45.819+03:00)
19:34:45.885 [elasticmq-akka.actor.default-dispatcher-3] DEBUG o.elasticmq.actor.QueueManagerActor - Looking up queue some_test, found?: true
19:34:45.905 [elasticmq-akka.actor.default-dispatcher-4] DEBUG o.elasticmq.actor.QueueManagerActor - Looking up queue some_test, found?: true
19:34:45.921 [elasticmq-akka.actor.default-dispatcher-4] DEBUG org.elasticmq.actor.queue.QueueActor - some_test: Sent message with id d0022c91-6e04-4ce1-810f-dc751e32015e
19:34:45.933 [elasticmq-akka.actor.default-dispatcher-3] DEBUG o.elasticmq.actor.QueueManagerActor - Looking up queue some_test, found?: true
19:34:45.940 [elasticmq-akka.actor.default-dispatcher-3] DEBUG org.elasticmq.actor.queue.QueueActor - some_test: Awaiting messages: start for sequence 0.
19:34:57.960 [elasticmq-akka.actor.default-dispatcher-8] DEBUG org.elasticmq.actor.queue.QueueActor - some_test: Awaiting messages: sequence 0 timed out. Replying with no messages.
19:34:57.972 [elasticmq-akka.actor.default-dispatcher-3] DEBUG o.elasticmq.actor.QueueManagerActor - Looking up queue some_test, found?: true
19:34:57.975 [elasticmq-akka.actor.default-dispatcher-3] DEBUG org.elasticmq.actor.queue.QueueActor - some_test: Receiving message d0022c91-6e04-4ce1-810f-dc751e32015e
Hi,
I've faced with an issue, when long polling doesn't work for messages with delay.
Use case: 1) Create
some_test
queue 2) Send message to this queue withDelaySeconds=5
3) Start long polling with the following parameters:WaitTimeSeconds=12
andTimeout=30
Result: Receiver gets message on the second attempt.
Logs:
Thanks