Hi Ramon, Thanks for your input, I've already tried that, but I don't think that the aggregator pattern applies here, it's more of a request-reply issue, correct me if I am wrong, but I think that aggregation applies to only one route, not the whole camel context, if I understand correctly your suggestion, I need to apply the aggregator on 2 different routes, this wouldn't work because there is no way for the camel context to know that I am working on the "same" message (albeit without the file extension), that is why I believe that BAM may provide some hints. Thanks for your answers. Ryadh.
Ramon Buckland wrote: > > Hi Amar, > > I have not used the Aggregator in Camel so please bear with me. You will > need to test this all. > > It seems to me that the aggregator would need to know (as you have > suggested) which "value" is to be your correlation Id. > > Have you tried running the messages through a "<setHeader > headerName="MyAppCorrelationId"><simple>${file:name.noext}</simple></setHeader>" > > And then in the aggregator, you need to tell it that this is the header > name, to use as the correlation Id. > > eg: > > <aggregate> > <header>MyAppCorrelationId</header> > .... > > Looking at the wiki documentation for the aggregator ( > http://activemq.apache.org/camel/aggregator.html) suggests this may work. > > Hope that helps. > > I have the following setup: >> a route which ends up moving files to directory input/ >> another one which polls the done/ and errors/ directories >> Now, an external applications takes files from the input processes them >> and >> sends the result to the done/ directory and the errors to the errors/ >> directory >> There is a common pattern in the file naming strategy: >> input: 123456.xml >> errors: 123456.log >> done: 123456.log >> ${file:name.noext} seems to be a good candidate for a correlation >> identifier >> But I can't get how I can use the identifier in the configuration of the >> routes >> I was looking for a correlate method for the route configuration dsl, but >> it >> doesn't seem to be available, >> and I gave a shot at BAM, which is realy helpful for time based checks, >> but >> doesn't seem to give me the possiblity to route messages(apart from >> failures) >> >> There is obviously a way to do this using processors, and filters etc... >> but >> I think that this could be achieved in a much simpler fashion. >> >> Thank you in advance for your replies, >> Ryadh. >> -- >> View this message in context: >> http://www.nabble.com/Using-the-correlation-id-in-regular-routes-tp20978464s22882p20978464.html >> Sent from the Camel - Users mailing list archive at Nabble.com. >> >> > > -- View this message in context: http://www.nabble.com/Using-the-correlation-id-in-regular-routes-tp20978464s22882p21011727.html Sent from the Camel - Users mailing list archive at Nabble.com.