Re: Error in wiki about pollEnrich?
Hi Claus "You can use a recipient list and construct a dynamic uri with the file name you want to poll. And you can then provide an aggregration strategy. For example the UseLatestAggregationStrategy. " Can you elaborate on how this is done. I can't quite put the pieces together to create what I need to do. That is, enrich with a specific filename from ftp. -- View this message in context: http://camel.465427.n5.nabble.com/Error-in-wiki-about-pollEnrich-tp2263967p3307827.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Error in wiki about pollEnrich?
On Wed, Aug 4, 2010 at 2:42 PM, Claus Ibsen wrote: > On Wed, Aug 4, 2010 at 2:39 PM, Andreas Asmuss > wrote: >> >> Ah ok. >> >> What are the samples in the wiki supposed to demonstrate then? >> -- > > There is still a lot you can enrich so the wiki examples are fine. > Ah the bottom examples was wrong. I have fixed them. They will work when we make it possible for PollingConsumer to access data from current Exchange. > > >> View this message in context: >> http://camel.465427.n5.nabble.com/Error-in-wiki-about-pollEnrich-tp2263967p2264015.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> > > > > -- > Claus Ibsen > Apache Camel Committer > > Author of Camel in Action: http://www.manning.com/ibsen/ > Open Source Integration: http://fusesource.com > Blog: http://davsclaus.blogspot.com/ > Twitter: http://twitter.com/davsclaus > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Error in wiki about pollEnrich?
On Wed, Aug 4, 2010 at 2:39 PM, Andreas Asmuss wrote: > > Ah ok. > > What are the samples in the wiki supposed to demonstrate then? > -- There is still a lot you can enrich so the wiki examples are fine. > View this message in context: > http://camel.465427.n5.nabble.com/Error-in-wiki-about-pollEnrich-tp2263967p2264015.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Error in wiki about pollEnrich?
Ah ok. What are the samples in the wiki supposed to demonstrate then? -- View this message in context: http://camel.465427.n5.nabble.com/Error-in-wiki-about-pollEnrich-tp2263967p2264015.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Error in wiki about pollEnrich?
Hi Enrich cannot use any information from the current Exchange. It's due to how the PollingConsumer API is designed. There is a JIRA ticket to improve this in the future. You can use a recipient list and construct a dynamic uri with the file name you want to poll. And you can then provide an aggregration strategy. For example the UseLatestAggregationStrategy. You can also just use a pojo and get the file using a producer template or by yourself. On Wed, Aug 4, 2010 at 1:55 PM, Andreas Asmuss wrote: > > Hi > > I have a use case as this: > 1. read an xml file > 2. extract a file name from the xml file > 3. poll for the extracted filename > > As I believe the easiest way to do this is with Enricher I came across the > example in the bottom of http://camel.apache.org/content-enricher.html. > > The red box says: > "For example you cannot set a filename in the Exchange.FILE_NAME header and > use pollEnrich to consume only that file. For that you must set the filename > in the endpoint URI." > > But the sample tries exactly that? > from("activemq:queue:order") > .setHeader(Exchange.FILE_NAME, header("orderId")) > .pollEnrich("file://order/data/additional") > .to("bean:processOrder"); > -- > View this message in context: > http://camel.465427.n5.nabble.com/Error-in-wiki-about-pollEnrich-tp2263967p2263967.html > Sent from the Camel - Users mailing list archive at Nabble.com. > -- Claus Ibsen Apache Camel Committer Author of Camel in Action: http://www.manning.com/ibsen/ Open Source Integration: http://fusesource.com Blog: http://davsclaus.blogspot.com/ Twitter: http://twitter.com/davsclaus
Re: Error in wiki about pollEnrich?
Maybe this example in the old FTP page: http://camel.apache.org/ftp.html#FTP-ConsumingaremoteFTPservertriggeredbyaroute is the only way to achieve this at the moment? -- View this message in context: http://camel.465427.n5.nabble.com/Error-in-wiki-about-pollEnrich-tp2263967p2263990.html Sent from the Camel - Users mailing list archive at Nabble.com.
Re: Error in wiki about pollEnrich?
And for the record nothing seems to work when using dynamic file names: This works: These don't: enrich2.txt -- enrich2.txt As the wiki is a bit ambiguous I'm not sure what is supposed to work and what isn't -- View this message in context: http://camel.465427.n5.nabble.com/Error-in-wiki-about-pollEnrich-tp2263967p2263987.html Sent from the Camel - Users mailing list archive at Nabble.com.