We have an implementation where messages are being placed on an AWS SQS
queue and being consumed by Camel AWS. We are using concurrentConsumers = 1.
We are logging the polling of the queue as done by
org.apache.camel.component.aws.sqs.SqsConsumer .

The test consists of sending a message to SQS (from a remote system) and
then logging the time the message is on the queue. On the Camel end, we have
trace logging on the SqsConsumer class, and we can see when the queue is
polled, and when messages are consumed.

If we place a message on the queue every 10 seconds, most times Camel picks
up the message in 1-2 seconds. However, there are many times when it takes
significantly longer (10+ seconds).

Basically we see this behavior:

    (Remote)Place message on SQS
    (Camel)Poll
    (Camel)Poll
    (Camel)Poll
    ... (for many polls, default 500 milliseconds apart)
    (Camel)Receive message from SQS

We have tested SQS end to end without Camel and there is no issue with
throughput (1000 messages in a few seconds).

Our Camel implementation for this test consists only of reading from the SQS
queue and logging - there is no other functionality.

We have tested with altering many of the other Camel SQS parameters, with no
difference in behavior.

However, if we test with concurrentConsumers = 10, for example, every
message is picked up from the queue almost instantly, with minimal delay.

My question is why doesn't the single consumer pick up messages in a timely
manner? If it is truly polling every 500 milliseconds, how is it not
"seeing" and picking up the messages?

Note - we are hesitant to enable the multi-threading that comes with using
concurrentConsumers because of the functionality of our application.




--
View this message in context: 
http://camel.465427.n5.nabble.com/Not-acquiring-message-from-SQS-in-timely-manner-tp5793342.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Reply via email to