You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "M.Ismail" <mo...@gmail.com> on 2011/03/09 04:25:41 UTC

IdempotentConsumer filtered messages

Hi, 

I am using camel 2.5.0 and I want to handle/process the messages that were
filtered due to the idempotent consumer. An empty response is returned to
the caller and I want to customize the response. 

Here is my route:

from("cxf:bean:secureCxfEndPoint")
    
.idempotentConsumer(simple("${body[0].requestHeader.getTransactionId}"),
    	FileIdempotentRepository.fileIdempotentRepository(new
File("src/main/resources/temp.txt"), 1))
    						
    	.process(new RechargeServiceReqToAPI())
    	.to("direct:processEmeraldRequests")
    	.process(new RechargeServiceRespToAPI())    	
    	;

I want to process the filtered messages using errorHandler but it doesn't
work. 

Thanks

--
View this message in context: http://camel.465427.n5.nabble.com/IdempotentConsumer-filtered-messages-tp3414967p3414967.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: IdempotentConsumer filtered messages

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

We have a ticket in JIRA to enhance the idempotent consumer EIP to
allow you to specify a sub-route what to do for duplicate messages.
Currently they are just ignored.

You should be able to use .end() when the idempotent consumer should
end, and then add an additional step. Then you can check if it was an
empty message and add your custom reply.


On Wed, Mar 9, 2011 at 4:25 AM, M.Ismail <mo...@gmail.com> wrote:
> Hi,
>
> I am using camel 2.5.0 and I want to handle/process the messages that were
> filtered due to the idempotent consumer. An empty response is returned to
> the caller and I want to customize the response.
>
> Here is my route:
>
> from("cxf:bean:secureCxfEndPoint")
>
> .idempotentConsumer(simple("${body[0].requestHeader.getTransactionId}"),
>        FileIdempotentRepository.fileIdempotentRepository(new
> File("src/main/resources/temp.txt"), 1))
>
>        .process(new RechargeServiceReqToAPI())
>        .to("direct:processEmeraldRequests")
>        .process(new RechargeServiceRespToAPI())
>        ;
>
> I want to process the filtered messages using errorHandler but it doesn't
> work.
>
> Thanks
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/IdempotentConsumer-filtered-messages-tp3414967p3414967.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/