You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flume.apache.org by "Evgeny Minkevich (JIRA)" <ji...@apache.org> on 2015/08/19 06:58:46 UTC

[jira] [Commented] (FLUME-2706) Camel source

    [ https://issues.apache.org/jira/browse/FLUME-2706?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14702454#comment-14702454 ] 

Evgeny Minkevich commented on FLUME-2706:
-----------------------------------------

Thank you for looking into this. Camel as a flume adapter is priceless, in my view.

Have not tried it yet, so it might have been already implemented - would it allow defining custom beans/components? The reason I am asking is that some camel components require additional configuration (JMS sources for example). So, technically we would need in that case a "tier1.sources.source1.contextConfigFile"

> Camel source
> ------------
>
>                 Key: FLUME-2706
>                 URL: https://issues.apache.org/jira/browse/FLUME-2706
>             Project: Flume
>          Issue Type: New Feature
>          Components: Sinks+Sources
>            Reporter: David Greco
>            Priority: Minor
>             Fix For: v1.7.0
>
>         Attachments: FLUME-2706-0.patch
>
>
> This component can start Camel routes, in this way provides a very powerful mechanism for ingesting data from virtually any source supported by Camel http://camel.apache.org.
> This source can be configured either with a Camel URI or with an XML file containing route specifications.
> The configuration is very simple, let's show a couple of examples:
> 1. Configuration by an URI:
> tier1.sources = source1
> tier1.channels = channel1
> tier1.sinks  = sink1
> tier1.sources.source1.type = org.apache.flume.source.camel.CamelSource
> tier1.sources.source1.sourceURI  = twitter://streaming/sample?type=event&consumerKey=<key>&consumerSecret=<secret>&accessToken=<accessToken>
> any URI supported by Camel components is valid. For Twitter, see [here](http://camel.apache.org/twitter.html).
> 2. Configuration by an xml file:
> tier1.sources = source1
> tier1.channels  = channel1
> tier1.sinks = sink1
> tier1.sources.source1.type = org.apache.flume.source.camel.CamelSource
> tier1.sources.source1.routesFile = conf/routes.xml
> where the routes.xml can contain something like:
> <routes xmlns="http://camel.apache.org/schema/spring">
>     <route id="route">
>         <from uri="twitter://streaming/sample?type=event&amp;consumerKey=<key>&amp;consumerSecret=<secret>&amp;accessToken=<accessToken>"/>
>         <to uri="direct-vm://source1"/>
>     </route>
> </routes>
> any route that wants to send data to flume must have as a target endpoint an URI with the following format: direct-vm://<name of the CamelSource>, so in our case the CamelSource's name is source1 and consequently the endpoint URI is: direct-vm://source1 as shown in the XML snippet above.
> The sourceURI property takes always precedence on the routesFile property.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)