Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
is there a way to write an Apache Camel route completely in pure Java and then integrate the jar into a Talend route?
For example, this would be for the code I would like to include:
@Component("myroute")
public class MyRouteBuilder extends RouteBuilder {
@Override
public void configure() {
restConfiguration().component("netty-http").port(8080);
rest("/api/items")
.patch("/{id}")
.consumes("application/json")
.produces("application/json")
.to("direct:patchItem");
from("direct:patchItem")
.log("PATCH request for item ${header.id} with body: ${body}")
// Hier kannst du die Patch-Logik implementieren
.setBody(simple("{ \"status\": \"updated\", \"id\": \"${header.id}\" }"))
.to("file:output?fileName=items.txt");
}
}
Thanks for any suggestions !
Regards,
Rainer
Hello,
Talend Routes are based on Apache Camel, but Talend does not support importing and running a standalone Camel RouteBuilder JAR directly inside a Talend Route.
Supported approach:
Package your custom logic as a Java class or JAR.
Add it to Talend as a module.
Invoke it from a Talend Route using components such as cProcessor, cBean, or cInvoke.
Talend remains responsible for managing the Camel context and route lifecycle.
Not supported:
Deploying a standalone Camel route that defines its own REST configuration (for example netty-http) and expecting Talend to merge or manage it automatically.
Best practice:
Use Talend Route components for routing and orchestration, and delegate complex business logic to external Java code. Deploy fully custom Camel services outside Talend if independent lifecycle management is required.
Thanks,
Gourav
Hello,
Talend Routes are based on Apache Camel, but Talend does not support importing and running a standalone Camel RouteBuilder JAR directly inside a Talend Route.
Supported approach:
Package your custom logic as a Java class or JAR.
Add it to Talend as a module.
Invoke it from a Talend Route using components such as cProcessor, cBean, or cInvoke.
Talend remains responsible for managing the Camel context and route lifecycle.
Not supported:
Deploying a standalone Camel route that defines its own REST configuration (for example netty-http) and expecting Talend to merge or manage it automatically.
Best practice:
Use Talend Route components for routing and orchestration, and delegate complex business logic to external Java code. Deploy fully custom Camel services outside Talend if independent lifecycle management is required.
Thanks,
Gourav
Hello Gourav,
thank you very much for your reply.
We are now taking the approach of programming Camel routes directly in Java and executing the bundles in Karaf without using Talend..
This is a better option for us.
Greetings
Rainer