Can I use AtlasMap with an older version of Apache Camel - apache-camel

Our pom.xml shows camel-parent is set at version 2.24.0, and AtlasMap says since Camel 3.7. We will not be updating our Camel version anytime soon, that is an entirely different conversation (government project with no budget for that).
I'm pretty new to Camel - can I just add AtlasMap to the pom.xml and use it anyway? If yes, any advice like special steps, etc?

It is possible to use AtlasMap with Camel 2.x: see https://docs.atlasmap.io/#running-with-apache-camel-2-x
Main differences are:
use atlas instead of atlasmap as component schemein Camel URIs
use io.atlasmap:camel-atlasmap as dependencies
Note that it was not a component provided by the Apache Camel projects in 2.x.

Related

SOLR - adding custom REST service

I am using SOLR 8.x. and I am trying to adding some custom functionality. Say like, triggering some server specific shell scripts. Adding custom code JARs to the lib folder and adding the jars in solrconfig.xml is not working.
Or how to set up new SOLR version in eclipse(most of the docs online are for older version where SOLR was still a .war)
Any pointers would be much appreciated.
I was able to achieve this by adding the custom jar(HTTPServlet based) to server/lib folder and by updating web.xml with servlet & servlet-mapping.

How to consume messages from Apache Camel JMS as Transacted Batch?

I know there is component sjms-batch which could perfectly solve my problem, but that component exist in Camel 3.7, and i need to use Camel 3.8. According to Camel documentation this component doesn't exist anymore after version 3.7. I couldn't find what is the reason for removing this component.
Does someone know why sjms-batch doesn't exist in newer versions?
And is there something similar that i could use with Camel 3.8?

Does groupExchanges() method still exist in apache Camel as part of the AggregationDefinition?

Is there a replacement for the groupExchanges() method;
which, according to the latest documentation, should be possible however, I am unable to compile the code as the method seems to have vanished.
This method is deprecated since Apache Camel 2.15.x and removed since 2.18.x. You are supposed to use GroupedExchangeAggregationStrategy instead.
.aggregate(new GroupedExchangeAggregationStrategy()) // Or AggregationStrategies.groupedExchange()
I have fixed documentation, on the website it will be deployed soon.

Is there a KairosDB component for Apache Camel?

I can't find a Camel component for KairosDB. Is there none?
Should I write a custom component or is there a smarter way?
Thanks
There is no official component for that. You can find the list of components at: https://github.com/apache/camel/tree/master/components#components
Yes you would need to write your own component, or just use regular Java code in a Java bean to integrate with KairosDB and then Camel can integrate with your Java bean. Or use a Camel Processor instead of a Java bean.
But writing a component is not so hard, and if you use KairosDB in more projects with Camel then it starts to make sense to build a Camel component for it. The Apache Camel project loves contributions: http://camel.apache.org/contributing

Apache camel route deployment - Independently?

Suppose I have 10 different Camel routes in my application, is it possible to stop one particular route alone during an issue and make changes to it(in one of the java processors) and deploy it again without affecting other routes.
Also can I create and deploy a new route on the fly, while other routes are already functioning.
If these are not the default behaviour, what are the options available to achieve this?
Karaf (so do Apache ServiceMix / JBoss Fuse)has hot deployment (nowadays this might be supported in JBoss AS / WildFly as well ). Meaning, you can create your routes as independent blueprint xml files in the deploy folder (meaning just xmls). Likewise you can have xml files for every route, whenever you make changes to XML's, it will be redeployed automatically.
This approach has few drawbacks, it will be complex if you have to deal with JPA or if your route has to deal with custom processors / classes.
Check out the examples in Apache ServiceMix / JBoss Fuse project.
I would recommend this approach especially if you want to take a microcontainer approach - Something like light weight Apache Karaf + Camel Route XML files + Docker.
I have done this few years back, may be this feature is possible to achieve in any other containers as well, which I am not sure.
You can stop a route via org.apache.camel.CamelContext.stopRoute(id) & you can modify it by building a new route and adding it to the context. This would let you change the logic of a route at runtime.
This wouldn't automatically let you hot deploy a new Java processor. I think this aspect of your question isn't Camel specific - their seem to be a few options for this, including OSGi/Karaf mentioned by #gnanaguru.
Perhaps moving the logic that you think might change from a Java processor to somewhere more dynamic (like some JavaScript in an external file, or in the route itself) would be a simpler solution to your problem.

Categories

Resources