Skip to content

Commit

Permalink
[INC-116] Update to camel 3.11.0 (#37)
Browse files Browse the repository at this point in the history
* [INC-116] Update to camel 3.11.0

* set version to 2.0.0

* updated changelog and readme with resolved issues during camel migration
  • Loading branch information
Vitalii Grodskyi authored Aug 12, 2021
1 parent 453a1d2 commit 5de8ed5
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 12 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
19 changes: 11 additions & 8 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
(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"
:url "https://www.apache.org/licenses/LICENSE-2.0.txt"}
: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"]
Expand All @@ -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}})
2 changes: 1 addition & 1 deletion src/main/clj/clj_camel/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -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))))
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/aggregate.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routes xmlns="http://camel.apache.org/schema/spring">
<route customId="false" id="1">
<route id="1">
<from uri="direct:test"/>
<setBody id="1">
<constant>test</constant>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/idempotent-consumer.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routes xmlns="http://camel.apache.org/schema/spring">
<route customId="false" id="1">
<route id="1">
<from uri="direct:test"/>
<setBody id="1">
<constant>test</constant>
Expand Down
2 changes: 1 addition & 1 deletion src/test/resources/throttle.xml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<routes xmlns="http://camel.apache.org/schema/spring">
<route customId="false" id="1">
<route id="1">
<from uri="direct:test"/>
<setBody id="1">
<constant>test</constant>
Expand Down

0 comments on commit 5de8ed5

Please sign in to comment.