gus-maurizio opened a new issue #1478:
URL: https://github.com/apache/camel-quarkus/issues/1478


   Need to run a full camelcontext in Kotlin Quarkus from an AWS lambda handler 
routine. This is working fine in Java and Spring.
   I have a challenge starting the whole quarkus camel main. Any pointers? 
   Non working (null pointer exception) below:
   `
   package com.example
   
   import java.io.*
   import com.fasterxml.jackson.module.kotlin.*
   import org.slf4j.Logger
   import org.slf4j.LoggerFactory
   import com.google.gson.Gson
   import com.google.gson.GsonBuilder
   import org.apache.camel.quarkus.main.CamelMainApplication
   
   data class HandlerInput(val who: String)
   data class HandlerOutput(val message: String)
   
   class App {
       val mapper = jacksonObjectMapper()
       val logger: Logger = LoggerFactory.getLogger("com.example.App")
       val gson: Gson = GsonBuilder().setPrettyPrinting().create()
   
       fun handler(input: InputStream, output: OutputStream): Unit {
           val inputObj = mapper.readValue<HandlerInput>(input)
           logger.info("input: {}", gson.toJson(inputObj))
   
           val camelMain = CamelMainApplication()
           camelMain.run()
           logger.info("Ending Camel")
           mapper.writeValue(output, HandlerOutput("Hello ${inputObj.who}"))
       }
   }
   `


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to