• Apache Camel – Polling Github commit

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-github</artifactId> <version>${camel-github-version}</version> </dependency> <dependency> <groupId>org.eclipse.mylyn.github</groupId> <artifactId>org.eclipse.egit.github.core</artifactId> <version>${github-core-version}</version> </dependency> Service Class package com.dineshkrish; import org.eclipse.egit.github.core.CommitUser; import org.eclipse.egit.github.core.RepositoryCommit; /** * * @author Dinesh… Continue reading "Apache Camel – Polling Github commit"

  • Apache Camel – Polling RSS Feed

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-rss</artifactId> <version>${camel-rss-version}</version> </dependency> Example Program package com.dineshkrish.example7; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; /** * * @author Dinesh Krishnan… Continue reading "Apache Camel – Polling RSS Feed"

  • Apache Camel – Convert File to String

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> Example Program package com.dineshkrish.example6; import java.io.File; import java.nio.file.Files; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; /** * *… Continue reading "Apache Camel – Convert File to String"

  • Apache Camel – Convert JSON to XML

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>${json.version}</version> </dependency> Example Program package com.dineshkrish; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext;… Continue reading "Apache Camel – Convert JSON to XML"

  • Apache Camel – Convert XML to JSON

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> <dependency> <groupId>org.json</groupId> <artifactId>json</artifactId> <version>${json.version}</version> </dependency> Example Program package com.dineshkrish.example6; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.Exchange; import org.apache.camel.Processor; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext;… Continue reading "Apache Camel – Convert XML to JSON"

  • Apache Camel – Processor

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> Camel Processor package com.dineshkrish.example51; import org.apache.camel.Exchange; import org.apache.camel.Processor; /** * * @author Dinesh Krishnan * */ public class MyProcessor implements Processor { public… Continue reading "Apache Camel – Processor"

  • Apache Camel – Send an Object to ActiveMQ

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-camel</artifactId> <version>${activemq-camel-version}</version> </dependency> Example Program package com.dineshkrish; import java.util.Date; import javax.jms.ConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.camel.CamelContext; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.jms.JmsComponent;… Continue reading "Apache Camel – Send an Object to ActiveMQ"

  • Apache Camel – Send a File to ActiveMQ

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> <dependency> <groupId>org.apache.activemq</groupId> <artifactId>activemq-camel</artifactId> <version>${activemq-camel-version}</version> </dependency> Main Program package com.dineshkrish.example4; import javax.jms.ConnectionFactory; import org.apache.activemq.ActiveMQConnectionFactory; import org.apache.camel.CamelContext; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.component.jms.JmsComponent; import org.apache.camel.impl.DefaultCamelContext; /** *… Continue reading "Apache Camel – Send a File to ActiveMQ"

  • Apache Camel – Producer and Consumer Template

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> Example Program package com.dineshkrish.example31; import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.ProducerTemplate; import org.apache.camel.builder.RouteBuilder; import org.apache.camel.impl.DefaultCamelContext; /** * * @author Dinesh Krishnan * */ public… Continue reading "Apache Camel – Producer and Consumer Template"

  • Apache Camel – File Copy

    Maven Dependencies <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> Camel Router package com.dineshkrish.example2; import org.apache.camel.builder.RouteBuilder; /** * * @author Dinesh Krishnan * */ public class FileCopyRouter extends RouteBuilder { @Override public void… Continue reading "Apache Camel – File Copy"

  • Apache Camel – Hello World

    Maven Dependency <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> <version>${camel-version}</version> </dependency> Camel Router package com.dineshkrish.example1; import org.apache.camel.builder.RouteBuilder; /** * * @author Dinesh Krishnan * */ public class HelloWorldRouter extends RouteBuilder { @Override public void… Continue reading "Apache Camel – Hello World"