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
sourceraw docstring

aggregatecljmacro

(aggregate pd expression strategy opts & body)

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-interval 1000 :completion-from-batch-consumer true :eager-check-completion true :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-interval  1000
              :completion-from-batch-consumer true
              :eager-check-completion true
              :completion-predicate (c/predicate (fn [_] true))}
             (c/to 'direct:result'))
...
sourceraw docstring

aggregatorclj

(aggregator f)

Simple wrapper for aggregator strategy

Simple wrapper for aggregator strategy
sourceraw 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
sourceraw docstring

body-expressionclj

source

camel-contextclj

(camel-context)

Creates the DefaultCamelContext.

Creates the DefaultCamelContext.
sourceraw 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')
...
sourceraw 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'))
sourceraw 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
sourceraw 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))
sourceraw docstring

create-jdbc-idempotent-repositoryclj

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

Creates a new jdbc based repository

Creates a new jdbc based repository
sourceraw docstring

create-memory-idempotent-repositoryclj

(create-memory-idempotent-repository)

Creates a new memory based repository

Creates a new memory based repository
sourceraw docstring

dead-letterclj

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

debug-exchangeclj

(debug-exchange & [pd])
source

debug-exchange-logclj

(debug-exchange-log ex)
source

delaycljmacro

(delay pd delay-in-ms & body)

Delayer EIP: Creates a delayer allowing you to delay the delivery of messages to some destination.

Delayer EIP:  Creates a delayer allowing you to delay the delivery of messages to some destination.
sourceraw docstring

detect-error-typecljmultimethod

source

do-catchcljmacro

(do-catch try-def error & body)

Related to do-try macro

Related to do-try macro
sourceraw docstring

do-finallycljmacro

(do-finally try-def & body)

Related to do-try macro

Related to do-try macro
sourceraw 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')
...
sourceraw docstring

endclj

(end pd)

Ends the current block

Ends the current block
sourceraw docstring

end-choiceclj

(end-choice cd)

Ends the current choice

Ends the current choice
sourceraw docstring

endpointclj

(endpoint exchange uri)

Resolves the given name to an Endpoint of the specified type. If the name has a singleton endpoint registered, then the singleton is returned. Otherwise, a new Endpoint is created and registered in the EndpointRegistry.

Resolves the given name to an Endpoint of the specified type.
If the name has a singleton endpoint registered, then the singleton is returned.
Otherwise, a new Endpoint is created and registered in the EndpointRegistry.
sourceraw docstring

enrichclj

(enrich pd & [uri f])

Enrich an exchange with additional data obtained from a resourceUri Read more http://camel.apache.org/content-enricher.html

Enrich an exchange with additional data obtained from a resourceUri
Read more http://camel.apache.org/content-enricher.html
sourceraw 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'})))
...
sourceraw docstring

filter-headersclj

(filter-headers headers header-name)
source

fn-nameclj

(fn-name f)

Getting function name for processor id

Getting function name for processor id
sourceraw docstring

fromclj

(from r & [uri])

Creates a new route from the given URI input

Creates a new route from the given URI input
sourceraw docstring

get-endpoint-uriclj

(get-endpoint-uri ex)

Get endpoint URI

Get endpoint URI
sourceraw docstring

get-in-bodyclj

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

get-in-headerclj

(get-in-header ex k)
source

get-in-headersclj

(get-in-headers ex)

Useful for getting state inside processors

Useful for getting state inside processors
sourceraw docstring

get-propertiesclj

(get-properties ex)

Useful for getting state inside processors

Useful for getting state inside processors
sourceraw docstring

grouped-body-strategyclj

source

grouped-exchange-strategyclj

source

header-expressionclj

(header-expression name)
source

header-filter-strategyclj

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

idempotent-consumercljmacro

(idempotent-consumer pd msg-id opts & body)

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

log-errorclj

(log-error pd & [msg {:keys [id]}])

Creates a log message to be logged at ERROR level.

Creates a log message to be logged at ERROR level.
sourceraw docstring

log-warnclj

(log-warn pd & [msg {:keys [id]}])

Creates a log message to be logged at WARN level.

Creates a log message to be logged at WARN level.
sourceraw docstring

marshalclj

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

Marshal the in body using the specified DataFormat

Marshal the in body using the specified DataFormat
sourceraw 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}')
...
sourceraw docstring

multicastcljmacro

(multicast pd opts & body)

Multicast EIP: Multicasts messages to all its child outputs; so that each processor and destination gets a copy of the original message to avoid the processors interfering with each other. Options: parallel-processing - if true exchanges processed in parallel timeout - a total timeout specified in millis, when using parallel processing

Multicast EIP:  Multicasts messages to all its child outputs;
so that each processor and destination gets a copy of the original message to avoid the processors
interfering with each other.
Options:
  parallel-processing - if true exchanges processed in parallel
  timeout - a total timeout specified in millis, when using parallel processing
sourceraw 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.
sourceraw docstring

on-prepare-failure-processorclj

source

on-whenclj

(on-when pd p)

Sets an additional predicate that should be true before the onCompletion is triggered. To be used for fine grained controlling whether a completion callback should be invoked or not

Sets an additional predicate that should be true before the onCompletion is triggered.
To be used for fine grained controlling whether a completion callback should be invoked or not
sourceraw docstring

otherwisecljmacro

(otherwise cd & body)

Related to choice

Related to choice
sourceraw docstring

poll-enrichclj

(poll-enrich pd & [uri])

Enrich an exchange with additional data obtained from a resourceUri using a org.apache.camel.PollingConsumer to poll the endpoint. Read more http://camel.apache.org/content-enricher.html

Enrich an exchange with additional data obtained  from a resourceUri using a org.apache.camel.PollingConsumer to poll the endpoint.
Read more http://camel.apache.org/content-enricher.html
sourceraw docstring

predicateclj

(predicate f)

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

Evaluates a binary predicate on the message (headers, properties, body)
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw docstring

receive-no-waitclj

(receive-no-wait consumer uri)

Receives from the endpoint, not waiting for a response if non exists.

Receives from the endpoint, not waiting for a response if non exists.
sourceraw docstring

recipient-listcljmacro

(recipient-list pd expr opts & body)

Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients Params: expr – expression to decide the destinations Options: parallel-processing - if true exchanges processed in parallel agg-strategy - aggregation strategy to use delimiter – a custom delimiter to use ignore-invalid-endpoints - if true ignores the invalidate endpoint exception when try to create a producer with that endpoint Read more https://camel.apache.org/components/latest/eips/recipientList-eip.html

Creates a dynamic recipient list allowing you to route messages to a number of dynamically specified recipients
Params:
  expr – expression to decide the destinations
Options:
  parallel-processing - if true exchanges processed in parallel
  agg-strategy - aggregation strategy to use
  delimiter – a custom delimiter to use
  ignore-invalid-endpoints - if true ignores the invalidate endpoint exception when try to create a producer with that endpoint
Read more https://camel.apache.org/components/latest/eips/recipientList-eip.html
sourceraw docstring

remove-headersclj

(remove-headers rd & [pattern])

Remove headers that match the specified pattern

Remove headers that match the specified pattern
sourceraw docstring

remove-routeclj

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

Removes route from camel context

Removes route from camel context
sourceraw docstring

request-body-and-headersclj

(request-body-and-headers producer-template endpoint-uri body headers)

Sends an synchronous body to the given endpoint

Sends an synchronous body to the given endpoint
sourceraw docstring

route-buildercljmacro

(route-builder & body)

Initialization single route

Initialization single route
sourceraw docstring

route-idclj

(route-id rd & [id])

Set the route id for this route

Set the route id for this route
sourceraw 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
sourceraw 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
sourceraw 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
sourceraw docstring

set-in-bodyclj

(set-in-body ex body)
source

set-in-headerclj

(set-in-header ex k value)
source

set-in-headers-from-wrapperclj

(set-in-headers-from-wrapper ex wrapped-headers)
source

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

stopclj

(stop pd)

Stops continue routing the current Exchange and marks it as completed.

Stops continue routing the current Exchange and marks it as completed.
sourceraw docstring

stringify-keyclj

(stringify-key k)
source

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

toclj

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

Sends the exchange to the given endpoint

Sends the exchange to the given endpoint
sourceraw docstring

to-dclj

(to-d rd & [uri])

Sends the exchange to the given dynamic endpoint

Sends the exchange to the given dynamic endpoint
sourceraw docstring

type-convertercljmacro

(type-converter & body)

Creates a type converter

Creates a type converter
sourceraw docstring

unmarshalclj

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

Unmarshals the in body using the specified DataFormat

Unmarshals the in body using the specified DataFormat
sourceraw docstring

whencljmacro

(when cd pred & body)

Related to choice

Related to choice
sourceraw docstring

wire-tapclj

(wire-tap rd & [uri {:keys [id]}])

Sends a copy of the exchange to the given endpoint

Sends a *copy* of the exchange to the given endpoint
sourceraw docstring

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

× close