You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Claus Ibsen <cl...@gmail.com> on 2015/08/05 10:01:51 UTC

Re: SQS component and SEDA queue

What version of Camel do you use? And have you tried to upgrade and use latest?

On Thu, Jul 30, 2015 at 10:32 PM, bitsof info <bi...@gmail.com> wrote:
> I have a route like this, the messages are sent to MyProcessor but are
> NOT deleted from SQS, they go invisible for 30 seconds, but then
> re-appear in SQS as available messages.
>
> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
> .process(new MyProcessor());
>
>
> IF I delete the SEDA route statement, it works as expected
>
>
> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
> // COMMENT OUT AND SQS messages get deleted
> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>   .process(new MyProcessor());



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Re: SQS component and SEDA queue

Posted by bitsofinfo <bi...@gmail.com>.
I am using 2.15.2

MyProcessor is done pretty quickly



On 8/5/15 5:26 AM, Claus Ibsen wrote:
> How long time does it take to process the message on the seda route?
> eg how long time does MyProcessor take?
>
> Though I think the problem is that maybe Amazon SQS is not thread safe
> when one thread consumes a message, and another thread marks the
> message as deleted. If that is the case we need to deny handover in
> the delete task.
>
>
>
>
>
> On Wed, Aug 5, 2015 at 10:01 AM, Claus Ibsen <cl...@gmail.com> wrote:
>> What version of Camel do you use? And have you tried to upgrade and use latest?
>>
>> On Thu, Jul 30, 2015 at 10:32 PM, bitsof info <bi...@gmail.com> wrote:
>>> I have a route like this, the messages are sent to MyProcessor but are
>>> NOT deleted from SQS, they go invisible for 30 seconds, but then
>>> re-appear in SQS as available messages.
>>>
>>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>>> .process(new MyProcessor());
>>>
>>>
>>> IF I delete the SEDA route statement, it works as expected
>>>
>>>
>>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>>> // COMMENT OUT AND SQS messages get deleted
>>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>>>   .process(new MyProcessor());
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2nd edition: http://www.manning.com/ibsen2
>
>


Re: SQS component and SEDA queue

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

I logged a ticket
https://issues.apache.org/jira/browse/CAMEL-9055



On Wed, Aug 5, 2015 at 2:06 PM, bitsofinfo <bi...@gmail.com> wrote:
> Sorry, in this case MyProcessor is done in under 1 second, so it is well
> within the visibility timeout
>
> On 8/5/15 5:26 AM, Claus Ibsen wrote:
>> How long time does it take to process the message on the seda route?
>> eg how long time does MyProcessor take?
>>
>> Though I think the problem is that maybe Amazon SQS is not thread safe
>> when one thread consumes a message, and another thread marks the
>> message as deleted. If that is the case we need to deny handover in
>> the delete task.
>>
>>
>>
>>
>>
>> On Wed, Aug 5, 2015 at 10:01 AM, Claus Ibsen <cl...@gmail.com> wrote:
>>> What version of Camel do you use? And have you tried to upgrade and use latest?
>>>
>>> On Thu, Jul 30, 2015 at 10:32 PM, bitsof info <bi...@gmail.com> wrote:
>>>> I have a route like this, the messages are sent to MyProcessor but are
>>>> NOT deleted from SQS, they go invisible for 30 seconds, but then
>>>> re-appear in SQS as available messages.
>>>>
>>>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>>>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>>>> .process(new MyProcessor());
>>>>
>>>>
>>>> IF I delete the SEDA route statement, it works as expected
>>>>
>>>>
>>>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>>>> // COMMENT OUT AND SQS messages get deleted
>>>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>>>>   .process(new MyProcessor());
>>>
>>>
>>> --
>>> Claus Ibsen
>>> -----------------
>>> http://davsclaus.com @davsclaus
>>> Camel in Action 2nd edition: http://www.manning.com/ibsen2
>>
>>
>



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2

Re: SQS component and SEDA queue

Posted by bitsofinfo <bi...@gmail.com>.
Sorry, in this case MyProcessor is done in under 1 second, so it is well
within the visibility timeout

On 8/5/15 5:26 AM, Claus Ibsen wrote:
> How long time does it take to process the message on the seda route?
> eg how long time does MyProcessor take?
>
> Though I think the problem is that maybe Amazon SQS is not thread safe
> when one thread consumes a message, and another thread marks the
> message as deleted. If that is the case we need to deny handover in
> the delete task.
>
>
>
>
>
> On Wed, Aug 5, 2015 at 10:01 AM, Claus Ibsen <cl...@gmail.com> wrote:
>> What version of Camel do you use? And have you tried to upgrade and use latest?
>>
>> On Thu, Jul 30, 2015 at 10:32 PM, bitsof info <bi...@gmail.com> wrote:
>>> I have a route like this, the messages are sent to MyProcessor but are
>>> NOT deleted from SQS, they go invisible for 30 seconds, but then
>>> re-appear in SQS as available messages.
>>>
>>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>>> .process(new MyProcessor());
>>>
>>>
>>> IF I delete the SEDA route statement, it works as expected
>>>
>>>
>>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>>> // COMMENT OUT AND SQS messages get deleted
>>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>>>   .process(new MyProcessor());
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> http://davsclaus.com @davsclaus
>> Camel in Action 2nd edition: http://www.manning.com/ibsen2
>
>


Re: SQS component and SEDA queue

Posted by Claus Ibsen <cl...@gmail.com>.
How long time does it take to process the message on the seda route?
eg how long time does MyProcessor take?

Though I think the problem is that maybe Amazon SQS is not thread safe
when one thread consumes a message, and another thread marks the
message as deleted. If that is the case we need to deny handover in
the delete task.





On Wed, Aug 5, 2015 at 10:01 AM, Claus Ibsen <cl...@gmail.com> wrote:
> What version of Camel do you use? And have you tried to upgrade and use latest?
>
> On Thu, Jul 30, 2015 at 10:32 PM, bitsof info <bi...@gmail.com> wrote:
>> I have a route like this, the messages are sent to MyProcessor but are
>> NOT deleted from SQS, they go invisible for 30 seconds, but then
>> re-appear in SQS as available messages.
>>
>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>> .process(new MyProcessor());
>>
>>
>> IF I delete the SEDA route statement, it works as expected
>>
>>
>> from("aws-sqs://myqueue?amazonSQSClient=#myclientbean&waitTimeSeconds=20&maxMessagesPerPoll=10&visibilityTimeout=30&deleteAfterRead=true")
>> // COMMENT OUT AND SQS messages get deleted
>> .to("seda:inbound-queue?waitForTaskToComplete=Never&concurrentConsumers=1")
>>   .process(new MyProcessor());
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2nd edition: http://www.manning.com/ibsen2



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2nd edition: http://www.manning.com/ibsen2