camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ketan Barapatre <>
Subject How can I filter message
Date Fri, 24 Feb 2012 04:56:26 GMT
Hello All,

I am reading mail using IMAP.

public class MailRouteBuilder extends RouteBuilder {

public void configure() throws Exception {



public class MailProcessor implements org.apache.camel.Processor {

public void process(Exchange exchange) throws Exception {

           // I'm receiving message/mail here

   Message message = exchange.getIn();


When I'm receiving mail I need to filter mail according to

1. To date and From date
2. Subject
3. Sender

So that In my process method I will receive only filtered mails.

For this I read Interceptors and Message Filters but did not understand it

Please guide me How can I filter mails ?


Ketan Barapatre

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message