Using Apache Camel to connect everything
Apache Camel is a rule-based routing and mediation engine that provides the Enterprise Integration Patterns using an API or declarative Java domain-specific language to configure routing and mediation rules.
Getting ready
In this recipe, we will use the Java Camel library. So, you need to add the org.apache.camel/camel-core
to your project.clj
:
(defproject chapter04 "0.1.0" :dependencies [[org.clojure/clojure "1.8.0"] [org.apache.camel/camel-core "2.16.1"]
How to do it...
Here, we will learn basic uses of Camel from Clojure.
Importing Camel classes
The following code imports the Camel classes that we will use:
(ns chapter04.camel (:import [org.apache.camel.impl DefaultCamelContext] [org.apache.camel.builder RouteBuilder] ...
Get Clojure Programming Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.