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

advice-with-route-buildercljmacro

(advice-with-route-builder & body)

Creates an AdviceWithRouteBuilder

Creates an AdviceWithRouteBuilder
raw 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'))
...
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 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

context-route-id-to-definition-mapclj

(context-route-id-to-definition-map context)

Return route-id to route definition map.

Return route-id to route definition map.
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-jdbc-orphan-lock-aware-idempotent-repositoryclj

(create-jdbc-orphan-lock-aware-idempotent-repository
  datasource
  processor-name
  camel-context
  &
  [{:keys [lock-max-age-millis lock-keepalive-interval-millis]
    :or {lock-max-age-millis 30000 lock-keepalive-interval-millis 3000}}])

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
                      use-exponential-backoff]}])

debug-exchangeclj

(debug-exchange & [pd])

debug-exchange-logclj

(debug-exchange-log ex)

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

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

endclj

(end pd)

Ends the current block

Ends the current block
raw docstring

end-choiceclj

(end-choice cd)

Ends the current choice

Ends the current choice
raw 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.
raw 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
raw docstring

exchange-propertyclj

(exchange-property name)

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 :guard (partial instance? String)))
(from r (builder :guard (partial instance? EndpointConsumerBuilder)))

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-expressionclj

(header-expression name)

header-filter-strategyclj

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

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

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

mock-endpointsclj

(mock-endpoints context route-id patterns & {:keys [skip] :or {skip false}})

Mock endpoints used in route-id in context by collection of patterns.

when skip passed as true, then exchanges found not be passed to endpoints consumers. when skip passed as false (default), then exchanges would reach the consumer.

Mock endpoints used in **route-id** in **context** by collection of patterns.

when **skip** passed as `true`, then exchanges found not be passed to endpoints consumers.
when **skip** passed as `false` (default), then exchanges would reach the consumer.
raw docstring

mock-endpoints-and-skipclj

(mock-endpoints-and-skip context route-id patterns)

Mock endpoints matching the patterns collection and do not send exchanges to them.

Mock endpoints matching the patterns collection and do not send exchanges to them.
raw 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
raw docstring

on-completioncljmacro

(on-completion pd opts & 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-exceptioncljmacro

(on-exception pd exceptions & body)

on-prepare-failure-processorclj


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

otherwisecljmacro

(otherwise cd & body)

Related to choice

Related to choice
raw 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
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

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

remove-headersclj

(remove-headers rd & [pattern])

Remove headers that match the specified pattern

Remove headers that match the specified pattern
raw docstring

remove-routeclj

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

Removes route from camel context

Removes route from camel context
raw 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
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

route-non-initialized-errorclj

(route-non-initialized-error route-id id->route-def)

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

set-in-bodyclj

(set-in-body ex body)

set-in-headerclj

(set-in-header ex k value)

set-in-headers-from-wrapperclj

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

set-propertyclj

(set-property pd & [name expr])

Adds a processor which sets the property on the IN message

Adds a processor which sets the property 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

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

stop-and-remove-routeclj

(stop-and-remove-route camel-context route-id)
(stop-and-remove-route camel-context timeout time-unit route-id)

stop-routeclj

(stop-route camel-context route-id)

stringify-keyclj

(stringify-key k)

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 :guard (partial instance? String)))
(to rd (builder :guard (partial instance? EndpointProducerBuilder)))
(to rd (uri :guard (partial instance? String)) (params :guard map?))

Sends the exchange to the given endpoint

Sends the exchange to the given endpoint
raw docstring

to-dclj

(to-d rd & [uri])

Sends the exchange to the given dynamic endpoint

Sends the exchange to the given dynamic endpoint
raw docstring

type-convertercljmacro

(type-converter & body)

Creates a type converter

Creates a type converter
raw docstring

unmarshalclj

(unmarshal 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

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

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

× close