You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2016/06/14 14:55:18 UTC

[1/3] camel git commit: Added language component docs to Gitbook

Repository: camel
Updated Branches:
  refs/heads/master d15029c4b -> e9368518a


Added language component docs to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e3e90166
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e3e90166
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e3e90166

Branch: refs/heads/master
Commit: e3e901666e71802a50341a448b663ba9647ad144
Parents: d15029c
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue Jun 14 16:39:37 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Jun 14 16:39:37 2016 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/language.adoc | 144 ++++++++++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md         |   1 +
 2 files changed, 145 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e3e90166/camel-core/src/main/docs/language.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/language.adoc b/camel-core/src/main/docs/language.adoc
new file mode 100644
index 0000000..af25217
--- /dev/null
+++ b/camel-core/src/main/docs/language.adoc
@@ -0,0 +1,144 @@
+[[Language-Language]]
+Language
+~~~~~~~~
+
+*Available as of Camel 2.5*
+
+The language component allows you to send link:exchange.html[Exchange]
+to an endpoint which executes a script by any of the supported
+link:languages.html[Languages] in Camel. +
+ By having a component to execute language scripts, it allows more
+dynamic routing capabilities. For example by using the
+link:routing-slip.html[Routing Slip] or link:dynamic-router.html[Dynamic
+Router] EIPs you can send messages to `language` endpoints where the
+script is dynamic defined as well.
+
+This component is provided out of the box in `camel-core` and hence no
+additional JARs is needed. You only have to include additional Camel
+components if the language of choice mandates it, such as using
+link:groovy.html[Groovy] or link:javascript.html[JavaScript] languages.
+
+[[Language-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+------------------------------------------
+language://languageName[:script][?options]
+------------------------------------------
+
+And from Camel 2.11 onwards you can refer to an external resource for
+the script using same notation as supported by the other
+link:language.html[Language]s in Camel
+
+[source,java]
+-----------------------------------------------------------
+language://languageName:resource:scheme:location][?options]
+-----------------------------------------------------------
+
+[[Language-URIOptions]]
+URI Options
+^^^^^^^^^^^
+
+
+// component options: START
+The Language component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The Language component supports 9 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| languageName | producer |  | String | *Required* Sets the name of the language to use
+| resourceUri | producer |  | String | Path to the resource or a reference to lookup a bean in the Registry to use as the resource
+| binary | producer | false | boolean | Whether the script is binary content or text content. By default the script is read as text content (eg java.lang.String)
+| cacheScript | producer | false | boolean | Whether to cache the compiled script and reuse Notice reusing the script can cause side effects from processing one Camel org.apache.camel.Exchange to the next org.apache.camel.Exchange.
+| contentCache | producer | false | boolean | Sets whether to use resource content cache or not.
+| script | producer |  | String | Sets the script to execute
+| transform | producer | true | boolean | Whether or not the result of the script should be used as message body. This options is default true.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
+| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[Language-MessageHeaders]]
+Message Headers
+^^^^^^^^^^^^^^^
+
+The following message headers can be used to affect the behavior of the
+component
+
+[width="100%",cols="10%,90%",options="header",]
+|=======================================================================
+|Header |Description
+
+|`CamelLanguageScript` |The script to execute provided in the header. Takes precedence over
+script configured on the endpoint.
+|=======================================================================
+
+[[Language-Examples]]
+Examples
+^^^^^^^^
+
+For example you can use the link:simple.html[Simple] language to
+link:message-translator.html[Message Translator] a message:
+
+In case you want to convert the message body type you can do this as
+well:
+
+You can also use the link:groovy.html[Groovy] language, such as this
+example where the input message will by multiplied with 2:
+
+You can also provide the script as a header as shown below. Here we use
+link:xpath.html[XPath] language to extract the text from the `<foo>`
+tag.
+
+[source,java]
+--------------------------------------------------------------------------------------------------------------------------------
+Object out = producer.requestBodyAndHeader("language:xpath", "<foo>Hello World</foo>", Exchange.LANGUAGE_SCRIPT, "/foo/text()");
+assertEquals("Hello World", out);
+--------------------------------------------------------------------------------------------------------------------------------
+
+[[Language-Loadingscriptsfromresources]]
+Loading scripts from resources
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.9*
+
+You can specify a resource uri for a script to load in either the
+endpoint uri, or in the `Exchange.LANGUAGE_SCRIPT` header. +
+ The uri must start with one of the following schemes: file:,
+classpath:, or http:
+
+For example to load a script from the classpath:
+
+By default the script is loaded once and cached. However you can disable
+the `contentCache` option and have the script loaded on each
+evaluation. +
+ For example if the file myscript.txt is changed on disk, then the
+updated script is used:
+
+From *Camel 2.11* onwards you can refer to the resource similar to the
+other link:language.html[Language]s in Camel by prefixing with
+`"resource:"` as shown below:
+
+[[Language-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+* link:languages.html[Languages]
+* link:routing-slip.html[Routing Slip]
+* link:dynamic-router.html[Dynamic Router]
+* link:script.html[Script]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/e3e90166/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index a7dde9f..b30bb82 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -84,6 +84,7 @@
     * [Direct](direct.adoc)
     * [Direct-vm](direct-vm.adoc)
     * [File](file.adoc)
+    * [Language](language.adoc)
     * [Mock](mock.adoc)
     * [Properties](properties.adoc)
 


[2/3] camel git commit: Added log component docs to Gitbook

Posted by ac...@apache.org.
Added log component docs to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/5a6d2f6c
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/5a6d2f6c
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/5a6d2f6c

Branch: refs/heads/master
Commit: 5a6d2f6c51bbe6c007bb9d67be4aca4de1815b30
Parents: e3e9016
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue Jun 14 16:44:36 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Jun 14 16:44:36 2016 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/log.adoc | 302 +++++++++++++++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md    |   1 +
 2 files changed, 303 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/5a6d2f6c/camel-core/src/main/docs/log.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/log.adoc b/camel-core/src/main/docs/log.adoc
new file mode 100644
index 0000000..0e9f414
--- /dev/null
+++ b/camel-core/src/main/docs/log.adoc
@@ -0,0 +1,302 @@
+[[Log-LogComponent]]
+Log Component
+~~~~~~~~~~~~~
+
+The *log:* component logs message exchanges to the underlying logging
+mechanism.
+
+Camel uses http://www.slf4j.org/[sfl4j] which allows you to configure
+logging via, among others:
+
+* http://logging.apache.org/log4j/[Log4j]
+* http://logback.qos.ch/[Logback]
+*
+http://java.sun.com/j2se/1.4.2/docs/api/java/util/logging/package-summary.html[JDK
+Util Logging logging]
+
+[[Log-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+-----------------------------
+log:loggingCategory[?options]
+-----------------------------
+
+Where *loggingCategory* is the name of the logging category to use. You
+can append query options to the URI in the following format,
+`?option=value&option=value&...`
+
+INFO:*Using Logger instance from the the Registry*
+As of *Camel 2.12.4/2.13.1*, if there's single instance
+of�`org.slf4j.Logger` found in the Registry, the *loggingCategory* is no
+longer used to create logger instance. The registered instance is used
+instead. Also it is possible to reference particular�`Logger` instance
+using�`?logger=#myLogger` URI parameter. Eventually, if there's no
+registered and URI�`logger` parameter, the logger instance is created
+using *loggingCategory*.
+
+For example, a log endpoint typically specifies the logging level using
+the `level` option, as follows:
+
+[source,java]
+----------------------------------------
+log:org.apache.camel.example?level=DEBUG
+----------------------------------------
+
+The default logger logs every exchange (_regular logging_). But Camel
+also ships with the `Throughput` logger, which is used whenever the
+`groupSize` option is specified.
+
+TIP:*Also a log in the DSL*
+There is also a `log` directly in the DSL, but it has a different
+purpose. Its meant for lightweight and human logs. See more details at
+link:logeip.html[LogEIP].
+
+[[Log-Options]]
+Options
+^^^^^^^
+
+
+// component options: START
+The Log component supports 1 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2s,1m,8",options="header"]
+|=======================================================================
+| Name | Java Type | Description
+| exchangeFormatter | ExchangeFormatter | Sets a custom ExchangeFormatter to convert the Exchange to a String suitable for logging. If not specified we default to DefaultExchangeFormatter.
+|=======================================================================
+{% endraw %}
+// component options: END
+
+
+
+// endpoint options: START
+The Log component supports 27 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| loggerName | producer |  | String | *Required* The logger name to use
+| groupActiveOnly | producer | true | Boolean | If true will hide stats when no new messages have been received for a time interval if false show stats regardless of message traffic.
+| groupDelay | producer |  | Long | Set the initial delay for stats (in millis)
+| groupInterval | producer |  | Long | If specified will group message stats by this time interval (in millis)
+| groupSize | producer |  | Integer | An integer that specifies a group size for throughput logging.
+| level | producer | INFO | String | Logging level to use. The default value is INFO.
+| marker | producer |  | String | An optional Marker name to use.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
+| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+| maxChars | formatting | 10000 | int | Limits the number of characters logged per line.
+| multiline | formatting | false | boolean | If enabled then each information is outputted on a newline.
+| showAll | formatting | false | boolean | Quick option for turning all options on. (multiline maxChars has to be manually set if to be used)
+| showBody | formatting | true | boolean | Show the message body.
+| showBodyType | formatting | true | boolean | Show the body Java type.
+| showCaughtException | formatting | false | boolean | f the exchange has a caught exception show the exception message (no stack trace). A caught exception is stored as a property on the exchange (using the key link org.apache.camel.ExchangeEXCEPTION_CAUGHT and for instance a doCatch can catch exceptions.
+| showException | formatting | false | boolean | If the exchange has an exception show the exception message (no stacktrace)
+| showExchangeId | formatting | false | boolean | Show the unique exchange ID.
+| showExchangePattern | formatting | true | boolean | Shows the Message Exchange Pattern (or MEP for short).
+| showFiles | formatting | false | boolean | If enabled Camel will output files
+| showFuture | formatting | false | boolean | If enabled Camel will on Future objects wait for it to complete to obtain the payload to be logged.
+| showHeaders | formatting | false | boolean | Show the message headers.
+| showOut | formatting | false | boolean | If the exchange has an out message show the out message.
+| showProperties | formatting | false | boolean | Show the exchange properties.
+| showStackTrace | formatting | false | boolean | Show the stack trace if an exchange has an exception. Only effective if one of showAll showException or showCaughtException are enabled.
+| showStreams | formatting | false | boolean | Whether Camel should show stream bodies or not (eg such as java.io.InputStream). Beware if you enable this option then you may not be able later to access the message body as the stream have already been read by this logger. To remedy this you will have to use Stream Caching.
+| skipBodyLineSeparator | formatting | true | boolean | Whether to skip line separators when logging the message body. This allows to log the message body in one line setting this option to false will preserve any line separators from the body which then will log the body as is.
+| style | formatting | Default | OutputStyle | Sets the outputs style to use.
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[Log-Regularloggersample]]
+Regular logger sample
+^^^^^^^^^^^^^^^^^^^^^
+
+In the route below we log the incoming orders at `DEBUG` level before
+the order is processed:
+
+[source,java]
+------------------------------------------------------------------------------------------
+from("activemq:orders").to("log:com.mycompany.order?level=DEBUG").to("bean:processOrder");
+------------------------------------------------------------------------------------------
+
+Or using Spring XML to define the route:
+
+[source,xml]
+---------------------------------------------------
+  <route>
+    <from uri="activemq:orders"/>
+    <to uri="log:com.mycompany.order?level=DEBUG"/>
+    <to uri="bean:processOrder"/>
+  </route> 
+---------------------------------------------------
+
+[[Log-Regularloggerwithformattersample]]
+Regular logger with formatter sample
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the route below we log the incoming orders at `INFO` level before the
+order is processed.
+
+[source,java]
+--------------------------------------------------------------------------------------
+from("activemq:orders").
+    to("log:com.mycompany.order?showAll=true&multiline=true").to("bean:processOrder");
+--------------------------------------------------------------------------------------
+
+[[Log-ThroughputloggerwithgroupSizesample]]
+Throughput logger with groupSize sample
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+In the route below we log the throughput of the incoming orders at
+`DEBUG` level grouped by 10 messages.
+
+[source,java]
+-----------------------------------------------------------------------------------
+from("activemq:orders").
+    to("log:com.mycompany.order?level=DEBUG&groupSize=10").to("bean:processOrder");
+-----------------------------------------------------------------------------------
+
+[[Log-ThroughputloggerwithgroupIntervalsample]]
+Throughput logger with groupInterval sample
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+This route will result in message stats logged every 10s, with an
+initial 60s delay and stats should be displayed even if there isn't any
+message traffic.
+
+[source,java]
+-----------------------------------------------------------------------------------------------------------------------------
+from("activemq:orders").
+to("log:com.mycompany.order?level=DEBUG&groupInterval=10000&groupDelay=60000&groupActiveOnly=false").to("bean:processOrder");
+-----------------------------------------------------------------------------------------------------------------------------
+
+The following will be logged:
+
+[source,java]
+------------------------------------------------------------------------------------------------------------------------------------
+"Received: 1000 new messages, with total 2000 so far. Last group took: 10000 millis which is: 100 messages per second. average: 100"
+------------------------------------------------------------------------------------------------------------------------------------
+
+[[Log-Fullcustomizationoftheloggingoutput]]
+Full customization of the logging output
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.11*
+
+With the options outlined in the link:log.html[#Formatting] section, you
+can control much of the output of the logger. However, log lines will
+always follow this structure:
+
+[source,java]
+--------------------------------------------------------------------------------------------------------------
+Exchange[Id:ID-machine-local-50656-1234567901234-1-2, ExchangePattern:InOut, 
+Properties:{CamelToEndpoint=log://org.apache.camel.component.log.TEST?showAll=true, 
+CamelCreatedTimestamp=Thu Mar 28 00:00:00 WET 2013}, 
+Headers:{breadcrumbId=ID-machine-local-50656-1234567901234-1-1}, BodyType:String, Body:Hello World, Out: null]
+--------------------------------------------------------------------------------------------------------------
+
+This format is unsuitable in some cases, perhaps because you need to...
+
+* ... filter the headers and properties that are printed, to strike a
+balance between insight and verbosity.
+* ... adjust the log message to whatever you deem most readable.
+* ... tailor log messages for digestion by log mining systems, e.g.
+Splunk.
+* ... print specific body types differently.
+* ... etc.
+
+Whenever you require absolute customization, you can create a class that
+implements the
+http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/ExchangeFormatter.html[`ExchangeFormatter`]
+interface. Within the `format(Exchange)` method you have access to the
+full Exchange, so you can select and extract the precise information you
+need, format it in a custom manner and return it. The return value will
+become the final log message.
+
+You can have the Log component pick up your custom `ExchangeFormatter`
+in either of two ways:
+
+*Explicitly instantiating the LogComponent in your Registry:*
+
+[source,java]
+---------------------------------------------------------------------
+<bean name="log" class="org.apache.camel.component.log.LogComponent">
+   <property name="exchangeFormatter" ref="myCustomFormatter" />
+</bean>
+---------------------------------------------------------------------
+
+*Convention over configuration:*
+
+Simply by registering a bean with the name `logFormatter`; the Log
+Component is intelligent enough to pick it up automatically.
+
+[source,java]
+----------------------------------------------------------------------
+<bean name="logFormatter" class="com.xyz.MyCustomExchangeFormatter" />
+----------------------------------------------------------------------
+
+NOTE: the `ExchangeFormatter` gets applied to *all Log endpoints within
+that Camel Context*. If you need different ExchangeFormatters for
+different endpoints, just instantiate the LogComponent as many times as
+needed, and use the relevant bean name as the endpoint prefix.
+
+From *Camel 2.11.2/2.12* onwards when using a custom log formatter, you
+can specify parameters in the log uri, which gets configured on the
+custom log formatter. Though when you do that you should define the
+"logFormatter" as prototype scoped so its not shared if you have
+different parameters, eg:
+
+[source,java]
+---------------------------------------------------------------------------------------
+<bean name="logFormatter" class="com.xyz.MyCustomExchangeFormatter" scope="prototype"/>
+---------------------------------------------------------------------------------------
+
+And then we can have Camel routes using the log uri with different
+options:
+
+[source,java]
+---------------------------------------------
+<to uri="log:foo?param1=foo&amp;param2=100"/>
+...
+<to uri="log:bar?param1=bar&amp;param2=200"/>
+---------------------------------------------
+
+[[Log-UsingLogcomponentinOSGi]]
+Using Log component in OSGi
++++++++++++++++++++++++++++
+
+*Improvement as of Camel 2.12.4/2.13.1*
+
+When using�Log component inside OSGi (e.g., in Karaf), the underlying
+logging mechanisms are provided by PAX logging. It searches for a bundle
+which invokes�`org.slf4j.LoggerFactory.getLogger()` method and
+associates the bundle with the logger instance. Without specifying
+custom�`org.sfl4j.Logger` instance, the logger created by Log component
+is associated with `camel-core` bundle.
+
+In some scenarios it is required that the bundle associated with logger
+should be the bundle which contains route definition. To do this, either
+register single instance of�`org.slf4j.Logger` in the Registry or
+reference it using�`logger` URI parameter.
+
+[[Log-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:tracer.html[Tracer]
+* link:how-do-i-use-log4j.html[How do I use log4j]
+* link:how-do-i-use-java-14-logging.html[How do I use Java 1.4 logging]
+* link:logeip.html[LogEIP] for using `log` directly in the DSL for human
+logs.
+

http://git-wip-us.apache.org/repos/asf/camel/blob/5a6d2f6c/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index b30bb82..b0afd23 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -85,6 +85,7 @@
     * [Direct-vm](direct-vm.adoc)
     * [File](file.adoc)
     * [Language](language.adoc)
+    * [Log](log.adoc)
     * [Mock](mock.adoc)
     * [Properties](properties.adoc)
 


[3/3] camel git commit: Added ref components docs to Gitbook

Posted by ac...@apache.org.
Added ref components docs to Gitbook


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/e9368518
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/e9368518
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/e9368518

Branch: refs/heads/master
Commit: e9368518a77d100f8d0f65035b286544322bc868
Parents: 5a6d2f6
Author: Andrea Cosentino <an...@gmail.com>
Authored: Tue Jun 14 16:54:23 2016 +0200
Committer: Andrea Cosentino <an...@gmail.com>
Committed: Tue Jun 14 16:54:23 2016 +0200

----------------------------------------------------------------------
 camel-core/src/main/docs/ref.adoc | 108 +++++++++++++++++++++++++++++++++
 docs/user-manual/en/SUMMARY.md    |   1 +
 2 files changed, 109 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/e9368518/camel-core/src/main/docs/ref.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/ref.adoc b/camel-core/src/main/docs/ref.adoc
new file mode 100644
index 0000000..a73eb40
--- /dev/null
+++ b/camel-core/src/main/docs/ref.adoc
@@ -0,0 +1,108 @@
+[[Ref-RefComponent]]
+Ref Component
+~~~~~~~~~~~~~
+
+The *ref:* component is used for lookup of existing endpoints bound in
+the link:registry.html[Registry].
+
+[[Ref-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+----------------------
+ref:someName[?options]
+----------------------
+
+Where *someName* is the name of an endpoint in the
+link:registry.html[Registry] (usually, but not always, the Spring
+registry). If you are using the Spring registry, `someName` would be the
+bean ID of an endpoint in the Spring registry.
+
+[[Ref-Options]]
+Ref Options
+^^^^^^^^^^^
+
+
+// component options: START
+The Ref component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The Ref component supports 5 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| name | common |  | String | *Required* Name of endpoint to lookup in the registry.
+| bridgeErrorHandler | consumer | false | boolean | Allows for bridging the consumer to the Camel routing Error Handler which mean any exceptions occurred while the consumer is trying to pickup incoming messages or the likes will now be processed as a message and handled by the routing Error Handler. By default the consumer will use the org.apache.camel.spi.ExceptionHandler to deal with exceptions that will be logged at WARN/ERROR level and ignored.
+| exceptionHandler | consumer (advanced) |  | ExceptionHandler | To let the consumer use a custom ExceptionHandler. Notice if the option bridgeErrorHandler is enabled then this options is not in use. By default the consumer will deal with exceptions that will be logged at WARN/ERROR level and ignored.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
+| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[Ref-Runtimelookup]]
+Runtime lookup
+^^^^^^^^^^^^^^
+
+This component can be used when you need dynamic discovery of endpoints
+in the link:registry.html[Registry] where you can compute the URI at
+runtime. Then you can look up the endpoint using the following code:
+
+[source,java]
+-------------------------------------------------------------------
+   // lookup the endpoint
+   String myEndpointRef = "bigspenderOrder";
+   Endpoint endpoint = context.getEndpoint("ref:" + myEndpointRef);
+   
+   Producer producer = endpoint.createProducer();
+   Exchange exchange = producer.createExchange();
+   exchange.getIn().setBody(payloadToSend);
+   // send the exchange
+   producer.process(exchange);
+   ...
+-------------------------------------------------------------------
+
+And you could have a list of endpoints defined in the
+link:registry.html[Registry] such as:
+
+[source,xml]
+----------------------------------------------------------------------------------
+  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/spring">
+      <endpoint id="normalOrder" uri="activemq:order.slow"/>
+      <endpoint id="bigspenderOrder" uri="activemq:order.high"/>
+      ...
+  </camelContext>
+----------------------------------------------------------------------------------
+
+[[Ref-Sample]]
+Sample
+^^^^^^
+
+In the sample below we use the `ref:` in the URI to reference the
+endpoint with the spring ID, `endpoint2`:
+
+You could, of course, have used the `ref` attribute instead:
+
+[source,xml]
+---------------------------
+      <to ref="endpoint2"/>
+---------------------------
+
+Which is the more common way to write it.
+
+[[Ref-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/e9368518/docs/user-manual/en/SUMMARY.md
----------------------------------------------------------------------
diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md
index b0afd23..e1e769e 100644
--- a/docs/user-manual/en/SUMMARY.md
+++ b/docs/user-manual/en/SUMMARY.md
@@ -88,6 +88,7 @@
     * [Log](log.adoc)
     * [Mock](mock.adoc)
     * [Properties](properties.adoc)
+    * [Ref](ref.adoc)
 
 * Components
     * [Async Http Client (AHC)](ahc.adoc)