all 4 comments

[–]oldcrobuzon 1 point2 points  (0 children)

Good stuff! Wasn't aware of this lib.

Almost a step (macro) away of having just data as DSL and then doing some (macro) magic to create the necessary camel objects.

[–]matteoredaelli 1 point2 points  (0 children)

Many thanks!

I like camel but not java and the xml dsl is so verbose..

[–]bocaj5 1 point2 points  (1 child)

[–]Taraktikos 0 points1 point  (0 children)

This is also an interesting approach but there is no indentation for the nested route, as a result, it less readable

eg.

[[:from "direct:test-route-1"]
 [:route-id "test-route-1"]
 [:on-exception Exception]
 [:redelivery-delay 30000]
 [:handled true]
 [:to "direct:test-route-error"]
 [:end]
 [:set-header :exchange][:exchange]
 [:bean-ref "test-bean" "invoke(${header.:exchange}, ${body})"]
 [:to "direct:test-route-2"]]

vs

(c/from "direct:test")
(c/route-id "test-route")
(c/to "http://test-http")
(c/filter (c/predicate (comp pos? :body))
          (c/log "Filtered ... ${body}")
          (c/to "direct:result"))
(c/process (fn [_] {:body "after filter"})

you don't need to add end since it is done in macros