Re: Converting ProcessorDefinition to DSL and interfacing with camel k
Thanks for the right advice. It was just a curious question from the point of re-usability of what we have built so far. Yes, we are looking forward to doing it the way as suggested. Cheers Reji On Wed, May 27, 2020 at 12:59 AM Claus Ibsen wrote: > Hi > > No and that is not the purpose of Camel K. > Camel K is a closed-world and opinionated runtime that dont support > such very unusual and special use cases. > > But on the other hand, whatever you can do from the configure() method > in a RouteBuilder is surfaced to the end user, so you can from there, > go grab xxxDefinition instances from somewhere, > and then build them on route(s). The Camel K operator does some > parsing of the code and if you do "strange" things it may not parse > accurately and if so then you need to be more specific of which Camel > JAR dependencies you use. > > But I would also say that why... and maybe your existing app is not > suitable for these use cases. > > On Wed, May 27, 2020 at 3:20 AM Reji Mathews > wrote: > > > > This might be a little wierd question. But, I was wondering if there is a > > way to convert an object of org.apache.camel.model.ProcessorDefinition > > object into an equivalent camel DSLs. > > I have an application which constructs ProcessorDefinition object using > low > > level camel api's and create a camel context to start it in a jvm. > > > > If there is a way to convert the same object into DSLs, I could possibly > > think of hooking up with camel-k > > > > Alternatively, does camel k have any interfacing to receive an object of > > ProcessorDefinition object? > > > > Cheers > > > > -- > Claus Ibsen > - > http://davsclaus.com @davsclaus > Camel in Action 2: https://www.manning.com/ibsen2 >
Re: Converting ProcessorDefinition to DSL and interfacing with camel k
Hi No and that is not the purpose of Camel K. Camel K is a closed-world and opinionated runtime that dont support such very unusual and special use cases. But on the other hand, whatever you can do from the configure() method in a RouteBuilder is surfaced to the end user, so you can from there, go grab xxxDefinition instances from somewhere, and then build them on route(s). The Camel K operator does some parsing of the code and if you do "strange" things it may not parse accurately and if so then you need to be more specific of which Camel JAR dependencies you use. But I would also say that why... and maybe your existing app is not suitable for these use cases. On Wed, May 27, 2020 at 3:20 AM Reji Mathews wrote: > > This might be a little wierd question. But, I was wondering if there is a > way to convert an object of org.apache.camel.model.ProcessorDefinition > object into an equivalent camel DSLs. > I have an application which constructs ProcessorDefinition object using low > level camel api's and create a camel context to start it in a jvm. > > If there is a way to convert the same object into DSLs, I could possibly > think of hooking up with camel-k > > Alternatively, does camel k have any interfacing to receive an object of > ProcessorDefinition object? > > Cheers -- Claus Ibsen - http://davsclaus.com @davsclaus Camel in Action 2: https://www.manning.com/ibsen2
Re: Converting ProcessorDefinition to DSL and interfacing with camel k
I guess you just need to assemble the ProcessorDefintion into a CamelRoute with a CamelContext to run it in a JVM. It's not good way to use these low level Camel APIs as there are too much details you need to explore. As we deploy the CamelRoute through Camel-K into K8s. It's more easy that you just use dumped camel route into XML and deploy it through Camel-K. Willem Jiang Twitter: willemjiang Weibo: 姜宁willem On Wed, May 27, 2020 at 9:20 AM Reji Mathews wrote: > > This might be a little wierd question. But, I was wondering if there is a > way to convert an object of org.apache.camel.model.ProcessorDefinition > object into an equivalent camel DSLs. > I have an application which constructs ProcessorDefinition object using low > level camel api's and create a camel context to start it in a jvm. > > If there is a way to convert the same object into DSLs, I could possibly > think of hooking up with camel-k > > Alternatively, does camel k have any interfacing to receive an object of > ProcessorDefinition object? > > Cheers
Converting ProcessorDefinition to DSL and interfacing with camel k
This might be a little wierd question. But, I was wondering if there is a way to convert an object of org.apache.camel.model.ProcessorDefinition object into an equivalent camel DSLs. I have an application which constructs ProcessorDefinition object using low level camel api's and create a camel context to start it in a jvm. If there is a way to convert the same object into DSLs, I could possibly think of hooking up with camel-k Alternatively, does camel k have any interfacing to receive an object of ProcessorDefinition object? Cheers