Re: Dynamic queue name from header property.

2012-07-06 Thread boday
you shouldn't need to set/get the extra header value, you can also just do this... activemq:queue:HLQ.${in.header.Q_NAME} dube wrote > > Hello > > I need to dynamically route my messages to queues using camel based off a > header property. I need to do this in a way w

Dynamic queue name from header property.

2012-07-06 Thread dube
Hello I need to dynamically route my messages to queues using camel based off a header property. I need to do this in a way where I can append the value of that header to a high level qualifier (HLQ) and have the message routed to that queue. Understanding that I need to add some validation logi

how to hide user and password in sftp in for statement

2012-07-06 Thread David Capwell
Hi, I am trying to use camel to get data out of an sftp end point. At the moment I have two issues. First, I want to hide the username and password. Second I would like to be able to reuse the uri and allow the sftp's directory to be paramiterized. Going over the docs online, I don't see a clear

Re: Choosing DSL Java or Spring

2012-07-06 Thread thomas barker
I much prefer java dsl for maintainability. Spring DSL is fine for small, simple routes that will never grow. As a response to the previous, I am not sure I would use Camel if maintenance was done by non-devs. On Fri, Jul 6, 2012 at 11:35 AM, Sam (Stephen Samuel) wrote: > IMO > > Pro Spring: >

Re: Choosing DSL Java or Spring

2012-07-06 Thread Sam (Stephen Samuel)
IMO Pro Spring: Can edit it "outside" the build, and by non-devs Pro DSL: Code completion / type checking Easier refactoring. BTW We just switched from spring to dsl. On Fri, Jul 6, 2012 at 4:31 PM, Sri wrote: > Hi All, > > Which id DSL is good for project. Java DSL or Spring. I have used

Choosing DSL Java or Spring

2012-07-06 Thread Sri
Hi All, Which id DSL is good for project. Java DSL or Spring. I have used java earlier how ever want to try Spring DSL in the current project. is there any disadvantages using Spring DSL. Regards Sri -- View this message in context: http://camel.465427.n5.nabble.com/Choosing-DSL-Java-or-Spring

Re: Bean binding @Body and Exchange

2012-07-06 Thread dealbitte
Dear Claus Ibsen, The issue got resolved. But it is unclear how it got fixed. I did few things (see below) and I am not sure which one did the trick. re-built the osgi-bundles that provided services (createXML and printXML) Executed osgi:refresh (karaf@root> osgi:refresh) restarted karaf and I c

Re: Aggregator Exchange.MULTICAST_COMPLETE recipientList

2012-07-06 Thread Claus Ibsen
On Fri, Jul 6, 2012 at 4:41 PM, Marco Crivellaro wrote: > Hi, > I am currently using a recipientList with parallel processing and streaming > option with a custom aggregator strategy. > > Exchange.MULTICAST_COMPLETE property read on aggregation seems to rely on > the recipient list order instead o

Aggregator Exchange.MULTICAST_COMPLETE recipientList

2012-07-06 Thread Marco Crivellaro
Hi, I am currently using a recipientList with parallel processing and streaming option with a custom aggregator strategy. Exchange.MULTICAST_COMPLETE property read on aggregation seems to rely on the recipient list order instead of the order in which they are aggregated. For instance if in recipi

Re: Attributes from RouteBuilder as beans in route

2012-07-06 Thread Claus Ibsen
Hi Make sure to set the params attribue before Camel is starting, so its != null On Fri, Jul 6, 2012 at 4:04 PM, Hilde wrote: > Hello! > > We use the Java DSL to model Camel Routes. > The RouteBuilder class that we use for this very Route has an attribute and > we would like to use this > attrib

Attributes from RouteBuilder as beans in route

2012-07-06 Thread Hilde
Hello! We use the Java DSL to model Camel Routes. The RouteBuilder class that we use for this very Route has an attribute and we would like to use this attribute as a bean inside the Route. Here is the code snippet: public class CreateScriptRoute extends RouteBuilder { ... private ScriptParams p

Re: [file2/ftp2]Source file not deleted after using a combination of file2 component and ftp2 component with templates

2012-07-06 Thread Aida
Thanks for your quick response Claus. I have checked the test I uploaded, it´s true that there is a FileOutputStream but it has its "close()" method. In addition for double-checking I removed all references to any *Stream to check that even then the test fails. Strangely this only happens when th

Problems with dynamic seda-routes in 2.10.0

2012-07-06 Thread Hartmut Lang
Hi, i have a problem with dynamically adding/removing seda-routes with the latest camel 2.10.0 release. It works for me with 2.9.2. My setup: - i have a dynmicRouter and i add and remove new seda-routes (from seda to http) on a specific registration/deregistration event in my system - the first

Re: Camel Samba/JCIFS component

2012-07-06 Thread Claus Ibsen
Hi Thanks for sharing. I added a link to this project from our user stories page (takes a bit to sync to html pages) https://cwiki.apache.org/confluence/display/CAMEL/User+Stories On Fri, Jul 6, 2012 at 11:51 AM, Pontus Ullgren wrote: > Hello, > > Since Stephen started this week in a spirit of s

Re: IdempotentRepository

2012-07-06 Thread Claus Ibsen
Hi You can use a filter, and then some custom logic (eg a pojo) and return true|false to accept the file. Then you dont need the idempotent pattern. And from Camel 2.10 onwards the filter is now also invoked for directories. So you can skip traversing down in directories you do not want to. On

Re: [file2/ftp2]Source file not deleted after using a combination of file2 component and ftp2 component with templates

2012-07-06 Thread Claus Ibsen
Hi When using files on windows, make sure that if you use any custom code that read the file using a stream ,such af FileInputStream, etc. you must close the stream. On windows the file cannot be moved/deleted if that occurs. So double check your own code first. On Fri, Jul 6, 2012 at 1:55 PM,

Re: Assigning File names to exchanges generated from split

2012-07-06 Thread Claus Ibsen
Hi You can call a bean in the setHeader so the result of the bean is the header value. On Fri, Jul 6, 2012 at 11:55 AM, somnath wrote: > Hi, > > My Camel route looks like below > from("file:/camel/inbox?noop=true&delay=48") > .autoStartup(true) > > .aggregate

Re: Filter and Aggregation Completion

2012-07-06 Thread Claus Ibsen
On Fri, Jul 6, 2012 at 1:17 PM, Pontus Ullgren wrote: > Just figured out that in newer version of Camel you set the predicate > by calling > from("file:/camel/inbox?noop=true") > .aggregate().setCompletionPredicate(new Predicate() {...}) > > Seems like the aggregator page need some TLC . > No,

[file2/ftp2]Source file not deleted after using a combination of file2 component and ftp2 component with templates

2012-07-06 Thread Aida
Hello, I'm having trouble when working with producerTemplate and consumerTemplate in the following scenary: 1. I read a file from a local directory with a consumerTemplate. The only options I'm using are: {fileName, charset, intialDelay, delay} 2. I copy that file to an ftp directory using a prod

AW: IdempotentRepository

2012-07-06 Thread Christian Lipp
eagerMaxMessagesPerPoll is true by default, so it doesn't change anything to set it. There was no difference for true/false. Regards, Christian -Ursprüngliche Nachricht- Von: Sam (Stephen Samuel) [mailto:samspad...@gmail.com] Gesendet: Freitag, 06. Juli 2012 13:13 An: users@camel.apache

AW: IdempotentRepository

2012-07-06 Thread Christian Lipp
My problem is that the number (date) is in the directory, not in the file. So I only know that I am finished when it moves to a new directory which doesn't work at the end. Regards, Christian -Ursprüngliche Nachricht- Von: Marco Westermann [mailto:marwesterm...@gmx.de] Gesendet: Freitag

Re: Filter and Aggregation Completion

2012-07-06 Thread Pontus Ullgren
Just figured out that in newer version of Camel you set the predicate by calling from("file:/camel/inbox?noop=true") .aggregate().setCompletionPredicate(new Predicate() {...}) Seems like the aggregator page need some TLC . // Pontus On Fri, Jul 6, 2012 at 1:04 PM, Pontus Ullgren wrote: > Ju

Re: IdempotentRepository

2012-07-06 Thread Sam (Stephen Samuel)
eagerMaxMessagesPerPoll needs to be set to true. On Fri, Jul 6, 2012 at 10:53 AM, Christian Lipp wrote: > Do you mean " eagerMaxMessagesPerPoll" ? > I set it to false, but nothing changed. > > In the camel code I could only find > > contains in GenericFileConsumer > Add, remove in GenericFileOnCo

Re: Filter and Aggregation Completion

2012-07-06 Thread Pontus Ullgren
Just a quick guess. Since you are filtering out messages from the batch the aggregator will not reach a decision that the batch is completed. The completeion from batch will wait for ALL message to arrive. See section "Using Batch Consumer" on this page http://camel.apache.org/aggregator.html You

Re: FTP misses few bytes when downloading files

2012-07-06 Thread Claus Ibsen
Hi Maybe you need to use binary transfer mode, binary=true http://camel.apache.org/ftp2 On Fri, Jul 6, 2012 at 10:25 AM, Nafees wrote: > Hi All, > > I am using FTP component to download files from FTP server to my local > folder, but it is missing 2 bytes of data for few files. > > My FTP url wi

FTP misses few bytes when downloading files

2012-07-06 Thread Nafees
Hi All, I am using FTP component to download files from FTP server to my local folder, but it is missing 2 bytes of data for few files. My FTP url will be like this: {0}://{1}@{2}/{3}?password={4}&passiveMode={5}&pollStrategy=#optimerPoll&throwExceptionOnConnectFailed=true&maximumReconnectAttemp

Re: IdempotentRepository

2012-07-06 Thread Marco Westermann
Hi, I had a very similar problem. I wrote a little bean which writes the last number processed to a file. Another method gives me the last number processed. regards, Marco Am 06.07.2012 11:53, schrieb Christian Lipp: Do you mean " eagerMaxMessagesPerPoll" ? I set it to false, but nothing ch

Filter and Aggregation Completion

2012-07-06 Thread somnath
Hi, My requirement is 1) Read a file location and extract only those files that have "End Date=Today's Date" as one of the headers. 2) Combine all of these files and generate a single file out of it. When I tried with from("file:/camel/inbox?noop=true") .filter().method(

Assigning File names to exchanges generated from split

2012-07-06 Thread somnath
Hi, My Camel route looks like below from("file:/camel/inbox?noop=true&delay=48") .autoStartup(true) .aggregate(simple(ANY_LITERAL),(OMAggregationStrategy)context.getBean("om-aggregation-strategy")).completionFromBatchConsumer() .beanRef(

AW: IdempotentRepository

2012-07-06 Thread Christian Lipp
Do you mean " eagerMaxMessagesPerPoll" ? I set it to false, but nothing changed. In the camel code I could only find contains in GenericFileConsumer Add, remove in GenericFileOnCompletion Regards, CL -Ursprüngliche Nachricht- Von: Sam (Stephen Samuel) [mailto:samspad...@gmail.com] Gese

Camel Samba/JCIFS component

2012-07-06 Thread Pontus Ullgren
Hello, Since Stephen started this week in a spirit of sharing I just wanted to announce that a camel samba/jcifs component that a college of mine (Martin Samuelsson) created for an integration project has now been published on github. https://github.com/Redpill-Linpro/camel-smb Current status is

Re: Help with newline while writing to the file.

2012-07-06 Thread Henryk Konsek
>Need help adding newline while writing to the file. > I am writing very large file using Apache Camel's File Component. > I am using StringBuffer to store very large string and then passing (passing > string ex.getIn().setBody(stringbuffer.toString()); ) it to the > file endpoint () What abo

Re: Camel Velocity Template throwing error

2012-07-06 Thread Henryk Konsek
> I tried JUnit sample to test velocity in camel given by Claus at > http://camel.apache.org/velocity.html > > And it is failing for me. I am getting following AssertionError: > > java.lang.AssertionError: mock://result Received message count. Expected: > <1> but was: <0> I copied the code to my I

Re: IdempotentRepository

2012-07-06 Thread Sam (Stephen Samuel)
"This operation is used if the option eager has been enabled." Take a look at that, that might be why confirm is not being called. On Fri, Jul 6, 2012 at 7:17 AM, Christian Lipp wrote: > Hello! > > I am fetching files from a FTP server (severall GB for the next years). > The files are produced d

Re: creating routes dynamically

2012-07-06 Thread Henryk Konsek
> How ever I wanted to read the messages from these routes > and But no clue how to inform this routes the which is going to be consumed? I don't get this sentence, could you elaborate it a little bit? -- Henryk Konsek http://henryk-konsek.blogspot.com

Re: creating routes dynamically

2012-07-06 Thread Sri
Hi , I have used in following way which works creating routes dynamically. ProducerTemplate template=exchange.getContext().createProducerTemplate(); Message msg=exchange.getOut(); System.err.println("Out msg headers " + msg.getHeaders()); for(int i=0;i<3;i++)

InvalidPayloadException deprecated in 2.10.0

2012-07-06 Thread PJ Walstroem
hello, I just noticed that InvalidPayloadException is deprecated in 2.10.0. Reading the source code, the only hint is "// TODO: We should remove this class in Camel 3.0, and just rely on the other exceptions for type conversion issues" So what do you suggest to use instead of the InvalidPayloadExc

Re: creating routes dynamically

2012-07-06 Thread Henryk Konsek
> You could use a Dynamic Router: Yeah, I suggest to evaluate Dynamic Router and Recipient List for your case. In many cases when somebody wants to create routes dynamically at runtime, she actually needs these two patterns :) . -- Henryk Konsek http://henryk-konsek.blogspot.com