You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Vincent Nonnenmacher <vi...@gmail.com> on 2012/02/11 18:56:03 UTC
About SQS deletion of Message (or policy?)
I have a complex routing system using Camel and I want to pull message from
an AWS-SQS queue
into it. but I would like to control the deletion of message at the end of
all the routes process.
I don't have a way to control how my message flow goes 'outside' a series
of routes and processing
so I don't see like I could use a Policy on that SQS endpoint.
Do you have a better suggestion beside caching Message Receipt handles in a
collection and then grab the AWS Client and do the deletion myself from
that collection when I consider the message to be safe to delete from the
queue ?
Regards
Re: About SQS deletion of Message (or policy?)
Posted by Willem Jiang <wi...@gmail.com>.
Just another thought, you can consider to inject a new Synchronization
which deletes the message as you want by using the Policy API.
You can find an example here[1]
[1]http://svn.apache.org/repos/asf/camel/trunk/components/camel-spring-security/src/main/java/org/apache/camel/component/spring/security/SpringSecurityAuthorizationPolicy.java
On Tue Feb 14 11:10:10 2012, Willem Jiang wrote:
> Hi
>
> If you take a look at the code of SqsConsumer[1] you will see the
> processCommit method.
> You can extends the SqsConsumer yourself to implement that logic
> yourself.
> Maybe we could consider to expose that kind of strategy API to user in
> Camel 3.0.
>
> [1]http://svn.apache.org/repos/asf/camel/trunk/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java
>
>
> On Sun Feb 12 01:56:03 2012, Vincent Nonnenmacher wrote:
>> I have a complex routing system using Camel and I want to pull
>> message from
>> an AWS-SQS queue
>> into it. but I would like to control the deletion of message at the
>> end of
>> all the routes process.
>>
>> I don't have a way to control how my message flow goes 'outside' a
>> series
>> of routes and processing
>> so I don't see like I could use a Policy on that SQS endpoint.
>>
>> Do you have a better suggestion beside caching Message Receipt
>> handles in a
>> collection and then grab the AWS Client and do the deletion myself from
>> that collection when I consider the message to be safe to delete from
>> the
>> queue ?
>>
>> Regards
>>
>
>
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang
Re: About SQS deletion of Message (or policy?)
Posted by Willem Jiang <wi...@gmail.com>.
Hi
If you take a look at the code of SqsConsumer[1] you will see the
processCommit method.
You can extends the SqsConsumer yourself to implement that logic
yourself.
Maybe we could consider to expose that kind of strategy API to user in
Camel 3.0.
[1]http://svn.apache.org/repos/asf/camel/trunk/components/camel-aws/src/main/java/org/apache/camel/component/aws/sqs/SqsConsumer.java
On Sun Feb 12 01:56:03 2012, Vincent Nonnenmacher wrote:
> I have a complex routing system using Camel and I want to pull message from
> an AWS-SQS queue
> into it. but I would like to control the deletion of message at the end of
> all the routes process.
>
> I don't have a way to control how my message flow goes 'outside' a series
> of routes and processing
> so I don't see like I could use a Policy on that SQS endpoint.
>
> Do you have a better suggestion beside caching Message Receipt handles in a
> collection and then grab the AWS Client and do the deletion myself from
> that collection when I consider the message to be safe to delete from the
> queue ?
>
> Regards
>
--
Willem
----------------------------------
FuseSource
Web: http://www.fusesource.com
Blog: http://willemjiang.blogspot.com (English)
http://jnn.javaeye.com (Chinese)
Twitter: willemjiang
Weibo: willemjiang