ConsumerTemplate
----------------

                 Key: CAMEL-1281
                 URL: https://issues.apache.org/activemq/browse/CAMEL-1281
             Project: Apache Camel
          Issue Type: New Feature
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: Future


We could use a nice consumer template for nice one liners consume endpoints.

Suppose I want to consume a file based on a dynamic filename I get from a 
Exchange message passed on to my from a JMS Queue or the like
Then I do some custom coding in a processor to read the file. 

Helping me would be a consumerTemplate where I can consume the file endpoint in 
one liner

Something like this:
{code}
String context = 
consumerTemplate.receive("file://inbox/foo.txt?directory=false", String.class);
{code}

Beware if we want to receive/poll an entire directory etc, it will generate 
several Exchanges. For that we might wanna group them in a GroupedExchange or 
support a List<Exchange> as return type or whatnot.

Just adding it here as in idea


Any thoughts?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to