diff --git a/CHANGELOG.md b/CHANGELOG.md index 1958a0b..a7ed8c7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,3 +6,4 @@ All notable changes to this project will be documented in this file. This change - Created first version of clj-camel [1.0.0]: https://github.com/TakeoffTech/clj-camel +[2.0.0]: Migrated apache camel version from 3.8 to 3.11 diff --git a/README.md b/README.md index a198805..8a32031 100644 --- a/README.md +++ b/README.md @@ -161,3 +161,9 @@ Specified pub-sub message attributes will be added to exchange header if exist ```clojure (c/set-pubsub-attributes-propagation context {"pubsub-attribute-name" "name-of-header-field"}) ``` + +## Apache Camel 3.8 -> 3.11 Migration Notes +* authentication mechanism in google-pubsub-component was changed. `serviceAccountKey` become mandatory parameter in google pubsub endpoint string: https://camel.apache.org/components/3.11.x/google-pubsub-component.html#_authentication_configuration +* changed interface of `Exchange` class: `getAllProperties` should be used instead of `getProperties` method +* apm-opentracing dependencies may need to be updated +* fasterxml/jackson dependencies may need to be updated \ No newline at end of file diff --git a/project.clj b/project.clj index f6b8da5..ed50420 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,6 @@ -(defproject takeoff/clj-camel "latest" +(def camel-version "3.11.0") + +(defproject takeoff/clj-camel "2.0.0" :description "Clojure wrapper for Apache Camel" :url "https://github.com/TakeoffTech/clj-camel" :license {:name "Apache License Version 2.0" @@ -6,11 +8,11 @@ :dependencies [[org.clojure/clojure "1.10.1"] [org.clojure/tools.logging "1.0.0"] - [org.apache.camel/camel-core "3.8.0"] - [org.apache.camel/camel-sql "3.8.0"] - [org.apache.camel/camel-jcache "3.8.0"] - [org.apache.camel/camel-management "3.8.0"] - [org.apache.camel/camel-ftp "3.8.0"] + [org.apache.camel/camel-core ~camel-version] + [org.apache.camel/camel-sql ~camel-version] + [org.apache.camel/camel-jcache ~camel-version] + [org.apache.camel/camel-management ~camel-version] + [org.apache.camel/camel-ftp ~camel-version] [malabarba/lazy-map "1.3"] [camel-snake-kebab "0.4.1"] @@ -29,6 +31,7 @@ :profiles {:test {:dependencies [[com.rpl/specter "1.1.3"] [org.ehcache/ehcache "3.8.1"] - [org.apache.camel/camel-http "3.8.0"] - [org.apache.camel/camel-jsonpath "3.8.0"]]} + [org.apache.camel/camel-http ~camel-version] + [org.apache.camel/camel-jsonpath ~camel-version] + [ch.qos.logback/logback-classic "1.2.3"]]} :uberjar {:aot :all}}) diff --git a/src/main/clj/clj_camel/core.clj b/src/main/clj/clj_camel/core.clj index 49d1e27..708aabd 100644 --- a/src/main/clj/clj_camel/core.clj +++ b/src/main/clj/clj_camel/core.clj @@ -115,7 +115,7 @@ (^void process [_ ^Exchange ex] (let [{:keys [headers body]} (f (lazy-map {:headers (camel-map (get-in-headers ex)) :properties (camel-map - (-> ex .getProperties)) + (-> ex .getAllProperties)) :body (get-in-body ex)}))] (core-when headers (-> ex .getIn (.setHeaders (.m headers)))) diff --git a/src/test/resources/aggregate.xml b/src/test/resources/aggregate.xml index adde032..3f2eeb4 100644 --- a/src/test/resources/aggregate.xml +++ b/src/test/resources/aggregate.xml @@ -1,6 +1,6 @@ - + test diff --git a/src/test/resources/idempotent-consumer.xml b/src/test/resources/idempotent-consumer.xml index e30dce0..e9d6214 100644 --- a/src/test/resources/idempotent-consumer.xml +++ b/src/test/resources/idempotent-consumer.xml @@ -1,6 +1,6 @@ - + test diff --git a/src/test/resources/throttle.xml b/src/test/resources/throttle.xml index f52f195..e08e3c9 100644 --- a/src/test/resources/throttle.xml +++ b/src/test/resources/throttle.xml @@ -1,6 +1,6 @@ - + test