Liking cljdoc? Tell your friends :D

clj-camel.core


add-routesclj

(add-routes context & routes)

Adds route to the camel context

Adds route to the camel context
raw docstring

aggregatecljmacro

(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')
...
raw docstring

aggregatorclj

(aggregator f)

Simple wrapper for aggregator strategy

Simple wrapper for aggregator strategy
raw docstring

async-request-body-and-headersclj

(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
raw docstring

body-expressionclj


camel-contextclj

(camel-context)

Creates the DefaultCamelContext.

Creates the DefaultCamelContext.
raw docstring

choicecljmacro

(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')
...
raw docstring

constantclj

(constant obj)

Creates constant expression eg. (c/set-body (c/constant 'x-token'))

Creates constant expression
eg. (c/set-body (c/constant 'x-token'))
raw docstring

convert-body-toclj

(convert-body-to rd & [clazz])

Converts the IN message body to the specified type

Converts the IN message body to the specified type
raw docstring

copy-body-to-headerclj

(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))
raw docstring

create-jdbc-idempotent-repositoryclj

(create-jdbc-idempotent-repository datasource processor-name)

Creates a new jdbc based repository

Creates a new jdbc based repository
raw docstring

create-memory-idempotent-repositoryclj

(create-memory-idempotent-repository)

Creates a new memory based repository

Creates a new memory based repository
raw docstring

dead-letterclj

(dead-letter r
             &
             [uri
              {:keys [add-exception-message-to-header maximum-redeliveries
                      redelivery-delay back-off-multiplier]}])

debug-exchangeclj

(debug-exchange & [pd])

debug-exchange-logclj

(debug-exchange-log ex)

detect-error-typecljmultimethod


do-catchcljmacro

(do-catch try-def error & body)

Related to do-try macro

Related to do-try macro
raw docstring

do-finallycljmacro

(do-finally try-def & body)

Related to do-try macro

Related to do-try macro
raw docstring

do-trycljmacro

(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')
...
raw docstring

enrichclj

(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
raw docstring

filtercljmacro

(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'})))
...
raw docstring

filter-headersclj

(filter-headers headers header-name)

fn-nameclj

(fn-name f)

Getting function name for processor id

Getting function name for processor id
raw docstring

fromclj

(from r & [uri])

Creates a new route from the given URI input

Creates a new route from the given URI input
raw docstring

get-endpoint-uriclj

(get-endpoint-uri ex)

Get endpoint URI

Get endpoint URI
raw docstring

get-in-bodyclj

(get-in-body ex)
(get-in-body ex clazz)

get-in-headerclj

(get-in-header ex k)

get-in-headersclj

(get-in-headers ex)

Useful for getting state inside processors

Useful for getting state inside processors
raw docstring

get-propertiesclj

(get-properties ex)

Useful for getting state inside processors

Useful for getting state inside processors
raw docstring

grouped-body-strategyclj


grouped-exchange-strategyclj


header-filter-strategyclj

(header-filter-strategy to-camel-headers to-external-headers)

idempotent-consumerclj

(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
raw docstring

json-pathclj

(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'))
raw docstring

keyword->stringclj

(keyword->string m)

Converting clojure keyword to string

  • using dictionary
  • as keyword string ':some-key' if not present in headers.clj
Converting clojure keyword to string
* using dictionary
* as keyword string ':some-key' if not present in headers.clj
raw docstring

logclj

(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.
raw docstring

marshalclj

(marshal pd & [data-format-definition])

Marshal the in body using the specified DataFormat

Marshal the in body using the specified DataFormat
raw docstring

memoizecljmacro

(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}')
...
raw docstring

on-completioncljmacro

(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.
raw docstring

on-prepare-failure-processorclj


otherwisecljmacro

(otherwise cd & body)

Related to choice

Related to choice
raw docstring

predicateclj

(predicate f)

Evaluates a binary predicate on the message (headers, properties, body)

Evaluates a binary predicate on the message (headers, properties, body)
raw docstring

predicate-exclj

(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
raw docstring

processclj

(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
raw docstring

process-exclj

(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
raw docstring

processorclj

(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
raw docstring

processor-exclj

(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
raw docstring

remove-routeclj

(remove-route context & [route-id])

Removes route from camel context

Removes route from camel context
raw docstring

route-buildercljmacro

(route-builder & body)

Initialization single route

Initialization single route
raw docstring

route-idclj

(route-id rd & [id])

Set the route id for this route

Set the route id for this route
raw docstring

send-body-and-headersclj

(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
raw docstring

set-bodyclj

(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
raw docstring

set-headerclj

(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
raw docstring

simpleclj

(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))
raw docstring

splitcljmacro

(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'}))
...
raw docstring

sub-routeclj

(sub-route named-node & [f])

Adds possibility to split big route to smallest part

Adds possibility to split big route to smallest part
raw docstring

throttlecljmacro

(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')
...
raw docstring

toclj

(to rd & [uri {:keys [id]}])

Sends the exchange to the given endpoint

Sends the exchange to the given endpoint
raw docstring

type-convertercljmacro

(type-converter & body)

Creates a type converter

Creates a type converter
raw docstring

unmarshallclj

(unmarshall pd & [data-format-definition])

Unmarshals the in body using the specified DataFormat

Unmarshals the in body using the specified DataFormat
raw docstring

whencljmacro

(when cd pred & body)

Related to choice

Related to choice
raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close