Is there a KairosDB component for Apache Camel? - 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

Related

Apache camel Endpoint schemes duplication

in apache camel, we have endpoints associated with scheme strings like "cxf", "ahc", "http" and the likes. What happens if there are two components built using the same scheme? I don't see a validation from camel framework which prevents the deployment of components with duplicate schemes. Should there be a validation in the first place or this is by design?
Regards
Gopal
I have a need to re-use available camel components from the community but change the endpoint scheme to make it unique. For example I want to use amqp component but in my blueprint route i would like to have unique scheme used "<camel from uri="mydomain-amqp">. This way I can re-use the amqp as a new component but also keep others using the amqp as is.
Camel prevents adding a component using a name/scheme that already exists. Adding your component under a different name would be something like this:
getContext().addComponent("mydomain-amqp", new AMQPComponent());

Can I use AtlasMap with an older version of 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.

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?

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.

How to deploy Custom Dataformat in camel

I am running Camel inside Karaf.
I have created a custom dataformat by implementing DataFormat interface.
Now I have my custom class.
In order to make it visible to my camel route inside karaf where to copy this class file?
Please provide guidance.
I'd just add it to my Camel application source code and deploy it with that bundle. If you need to reuse it across several bundles, then you could package it as a separate bundle and export/import it appropriately I suppose...

Resources