Skip to content

Commit

Permalink
Fix set in header (#27)
Browse files Browse the repository at this point in the history
  • Loading branch information
gameformush authored Mar 22, 2021
1 parent 9bdb43a commit aa77b5e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/clj/clj_camel/core.clj
Original file line number Diff line number Diff line change
Expand Up @@ -145,12 +145,6 @@
[^ProcessorDefinition processor-definition & [^Expression expr]]
(.setBody processor-definition expr))

(defn set-in-body [^Exchange ex body]
(-> ex .getIn (.setBody body)))

(defn set-in-header [^Exchange ex k value]
(-> ex .getIn (.setHeader (str k) value)))

(defn simple
"Creates simple expression
eg. (c/idempotent-consumer (c/simple '${body}') (c/create-memory-idempotent-repository))"
Expand Down Expand Up @@ -465,6 +459,12 @@
(defn get-in-header [^Exchange ex k]
(-> ex (.getIn) (.getHeader (name k))))

(defn set-in-body [^Exchange ex body]
(-> ex .getIn (.setBody body)))

(defn set-in-header [^Exchange ex k value]
(-> ex .getIn (.setHeader (name k) value)))

(defn debug-exchange-log [ex]
(log/warn "------------------------------------------")
(log/warn "From endpoint:" (get-endpoint-uri ex))
Expand Down

0 comments on commit aa77b5e

Please sign in to comment.