(add-routes context & routes)
Adds route to the camel context
Adds route to the camel context
(aggregate pd
expression
strategy
&
[{:keys [completion-size completion-timeout parallel-processing
completion-predicate]}])
The Aggregator from the EIP patterns allows you to combine a number of messages together into a single message. Read more https://camel.apache.org/components/latest/eips/aggregate-eip.html ... (c/set-body (c/constant 'test')) (c/aggregate (c/constant 1) c/grouped-body-strategy {:completion-size 1000 :completion-timeout 1000 :completion-predicate (c/predicate (fn [_] true))}) (c/to 'direct:result') ...
The Aggregator from the EIP patterns allows you to combine a number of messages together into a single message. Read more https://camel.apache.org/components/latest/eips/aggregate-eip.html ... (c/set-body (c/constant 'test')) (c/aggregate (c/constant 1) c/grouped-body-strategy {:completion-size 1000 :completion-timeout 1000 :completion-predicate (c/predicate (fn [_] true))}) (c/to 'direct:result') ...
(aggregator f)
Simple wrapper for aggregator strategy
Simple wrapper for aggregator strategy
(async-request-body-and-headers producer-template endpoint-uri body headers)
Sends an asynchronous body to the given endpoint
Sends an asynchronous body to the given endpoint
(camel-context)
Creates the DefaultCamelContext.
Creates the DefaultCamelContext.
(choice pd & body)
The Content Based Router from the EIP patterns allows you to route messages to the correct destination based on the contents of the message exchanges. Read more https://camel.apache.org/components/latest/eips/choice-eip.html ... (c/choice (c/when (c/predicate (comp pos? :body)) (c/log 'when 1') (c/process some-processor)) (c/when (c/predicate (comp neg? :body)) (c/log 'when 2') (c/process some-processor)) (c/otherwise (c/log 'otherwise') (c/process some-processor))) (c/log 'after choice') ...
The Content Based Router from the EIP patterns allows you to route messages to the correct destination based on the contents of the message exchanges. Read more https://camel.apache.org/components/latest/eips/choice-eip.html ... (c/choice (c/when (c/predicate (comp pos? :body)) (c/log 'when 1') (c/process some-processor)) (c/when (c/predicate (comp neg? :body)) (c/log 'when 2') (c/process some-processor)) (c/otherwise (c/log 'otherwise') (c/process some-processor))) (c/log 'after choice') ...
(constant obj)
Creates constant expression eg. (c/set-body (c/constant 'x-token'))
Creates constant expression eg. (c/set-body (c/constant 'x-token'))
(convert-body-to rd & [clazz])
Converts the IN message body to the specified type
Converts the IN message body to the specified type
(copy-body-to-header k)
Copies current body to header with specific key eg. (c/process (c/copy-body-to-header :body-data))
Copies current body to header with specific key eg. (c/process (c/copy-body-to-header :body-data))
(create-jdbc-idempotent-repository datasource processor-name)
Creates a new jdbc based repository
Creates a new jdbc based repository
(create-memory-idempotent-repository)
Creates a new memory based repository
Creates a new memory based repository
(dead-letter r
&
[uri
{:keys [add-exception-message-to-header maximum-redeliveries
redelivery-delay back-off-multiplier]}])
(do-catch try-def error & body)
Related to do-try macro
Related to do-try macro
(do-finally try-def & body)
Related to do-try macro
Related to do-try macro
(do-try pd & body)
Try... Catch...Finally block Read more https://camel.apache.org/manual/latest/try-catch-finally.html ... (c/do-try (c/to 'http://test-http') (c/do-catch Exception (c/log 'handle exception') (c/log 'handle exception2')) (c/do-finally (c/log 'finally') (c/log 'finally2'))) (c/log 'after do-try') ...
Try... Catch...Finally block Read more https://camel.apache.org/manual/latest/try-catch-finally.html ... (c/do-try (c/to 'http://test-http') (c/do-catch Exception (c/log 'handle exception') (c/log 'handle exception2')) (c/do-finally (c/log 'finally') (c/log 'finally2'))) (c/log 'after do-try') ...
(enrich pd & [uri f])
Enrich an exchange with additional data obtained from Read more http://camel.apache.org/content-enricher.html
Enrich an exchange with additional data obtained from Read more http://camel.apache.org/content-enricher.html
(filter pd predicate & body)
The Message Filter from the EIP patterns allows you to filter messages Read more https://camel.apache.org/components/latest/eips/filter-eip.html ... (c/route-builder (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'}))) ...
The Message Filter from the EIP patterns allows you to filter messages Read more https://camel.apache.org/components/latest/eips/filter-eip.html ... (c/route-builder (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'}))) ...
(fn-name f)
Getting function name for processor id
Getting function name for processor id
(from r & [uri])
Creates a new route from the given URI input
Creates a new route from the given URI input
(get-in-headers ex)
Useful for getting state inside processors
Useful for getting state inside processors
(get-properties ex)
Useful for getting state inside processors
Useful for getting state inside processors
(idempotent-consumer pd msg-id & [repo])
The Idempotent Consumer from the EIP patterns is used to filter out duplicate messages. Read more https://camel.apache.org/components/latest/eips/idempotentConsumer-eip.html
The Idempotent Consumer from the EIP patterns is used to filter out duplicate messages. Read more https://camel.apache.org/components/latest/eips/idempotentConsumer-eip.html
(json-path obj)
Creates constant expression eg. (c/set-body (c/json-path '$.data'))
Creates constant expression eg. (c/set-body (c/json-path '$.data'))
(keyword->string m)
Converting clojure keyword to string
Converting clojure keyword to string * using dictionary * as keyword string ':some-key' if not present in headers.clj
(log pd & [msg {:keys [id]}])
Creates a log message to be logged at INFO level.
Creates a log message to be logged at INFO level.
(marshal pd & [data-format-definition])
Marshal the in body using the specified DataFormat
Marshal the in body using the specified DataFormat
(memoize pd policy & body)
Create JCachePolicy interceptor around a route that caches the 'result of the route' Read more https://camel.apache.org/components/latest/jcache-component.html#_jcache_policy By default the message body at the beginning of the route is the cache key and the body at the end is the stored value.
... (c/set-body ${body.order-id}) (log 'order requested: ${body}') (c/memoize jcache-x-token-policy (log 'getting order with id: ${body}') (c/set-body (constant 'result-order'))) (log 'order found: ${body}') ...
Create JCachePolicy interceptor around a route that caches the 'result of the route' Read more https://camel.apache.org/components/latest/jcache-component.html#_jcache_policy By default the message body at the beginning of the route is the cache key and the body at the end is the stored value. ... (c/set-body ${body.order-id}) (log 'order requested: ${body}') (c/memoize jcache-x-token-policy (log 'getting order with id: ${body}') (c/set-body (constant 'result-order'))) (log 'order found: ${body}') ...
(on-completion pd & body)
Adds a hook that invoke this route as a callback when the Exchange has finished being processed.
Adds a hook that invoke this route as a callback when the Exchange has finished being processed.
(predicate f)
Evaluates a binary predicate on the message (headers, properties, body)
Evaluates a binary predicate on the message (headers, properties, body)
(predicate-ex f)
Evaluates a binary predicate on the message exchange. Can be used for high load routes
Evaluates a binary predicate on the message exchange. Can be used for high load routes
(process pd & [f {:keys [id]}])
Adds the custom processor to this destination whichcould be a final destination, or could be a transformation in a pipeline
Adds the custom processor to this destination whichcould be a final destination, or could be a transformation in a pipeline
(process-ex pd & [f {:keys [id]}])
Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipeline. Can be used for high load routes
Adds the custom processor to this destination which could be a final destination, or could be a transformation in a pipeline. Can be used for high load routes
(processor f)
Simple wrapper of clojure function for applying Apache Camel processor interface for processing headers, properties, body
Simple wrapper of clojure function for applying Apache Camel processor interface for processing headers, properties, body
(processor-ex f)
Simple wrapper of clojure function for applying Apache Camel processor interface for processing Exchange
Simple wrapper of clojure function for applying Apache Camel processor interface for processing Exchange
(remove-route context & [route-id])
Removes route from camel context
Removes route from camel context
(route-builder & body)
Initialization single route
Initialization single route
(route-id rd & [id])
Set the route id for this route
Set the route id for this route
(send-body-and-headers producer-template endpoint-uri body headers)
Sends the body to an endpoint with the specified headers and header values
Sends the body to an endpoint with the specified headers and header values
(set-body processor-definition & [expr])
Adds a processor which sets the body on the IN message
Adds a processor which sets the body on the IN message
(set-header pd & [name expr])
Adds a processor which sets the header on the IN message
Adds a processor which sets the header on the IN message
(simple text)
Creates simple expression eg. (c/idempotent-consumer (c/simple '${body}') (c/create-memory-idempotent-repository))
Creates simple expression eg. (c/idempotent-consumer (c/simple '${body}') (c/create-memory-idempotent-repository))
(split pd expr opts & body)
The Splitter from the EIP patterns allows you split a message into a number of pieces and process them individually. Read more https://camel.apache.org/components/latest/eips/split-eip.html ... (c/split (c/json-path '$.data.*') {:agg-strategy c/grouped-exchange-strategy :streaming true :parallel-processing true} (c/process (fn [] {}) {:id 'dummy-process-1'}) (c/to 'direct:result' {:id 'result'})) (c/process (fn [] {:body 'after'})) ...
The Splitter from the EIP patterns allows you split a message into a number of pieces and process them individually. Read more https://camel.apache.org/components/latest/eips/split-eip.html ... (c/split (c/json-path '$.data.*') {:agg-strategy c/grouped-exchange-strategy :streaming true :parallel-processing true} (c/process (fn [_] {}) {:id 'dummy-process-1'}) (c/to 'direct:result' {:id 'result'})) (c/process (fn [_] {:body 'after'})) ...
(sub-route named-node & [f])
Adds possibility to split big route to smallest part
Adds possibility to split big route to smallest part
(throttle pd
requests-number
&
[{:keys [async-delayed reject-execution time-period-millis
executor-service-ref correlation-expression
caller-runs-when-rejected]}])
The Throttler Pattern allows you to ensure that a specific endpoint does not get overloaded, or that we don’t exceed an agreed SLA with some external service. Read more https://camel.apache.org/components/latest/eips/throttle-eip.html ... (c/set-body (c/constant 'test')) (c/throttle 20 {:async-delayed false :reject-execution false :time-period-millis 10000}) (c/to 'direct:result') ...
The Throttler Pattern allows you to ensure that a specific endpoint does not get overloaded, or that we don’t exceed an agreed SLA with some external service. Read more https://camel.apache.org/components/latest/eips/throttle-eip.html ... (c/set-body (c/constant 'test')) (c/throttle 20 {:async-delayed false :reject-execution false :time-period-millis 10000}) (c/to 'direct:result') ...
(to rd & [uri {:keys [id]}])
Sends the exchange to the given endpoint
Sends the exchange to the given endpoint
(type-converter & body)
Creates a type converter
Creates a type converter
(unmarshall pd & [data-format-definition])
Unmarshals the in body using the specified DataFormat
Unmarshals the in body using the specified DataFormat
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close