camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [44/51] [partial] camel git commit: CAMEL-9541: Use -component as suffix for component docs.
Date Tue, 16 Aug 2016 08:04:08 GMT
http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/camel-core/src/main/docs/scheduler.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/scheduler.adoc b/camel-core/src/main/docs/scheduler.adoc
deleted file mode 100644
index 211e1aa..0000000
--- a/camel-core/src/main/docs/scheduler.adoc
+++ /dev/null
@@ -1,181 +0,0 @@
-[[Scheduler-SchedulerComponent]]
-Scheduler Component
-~~~~~~~~~~~~~~~~~~~
-
-*Available as of Camel 2.15*
-
-The *scheduler:* component is used to generate message exchanges when a
-scheduler fires. This component is similar to the
- link:timer.html[Timer] component, but it offers more functionality in
-terms of scheduling. Also this component uses
-JDK `ScheduledExecutorService`. Where as the timer uses a JDK `Timer`.
-
-You can only consume events from this endpoint.
-
-[[Scheduler-URIformat]]
-URI format
-^^^^^^^^^^
-
-[source,java]
-------------------------
-scheduler:name[?options]
-------------------------
-
-Where `name` is the name of the scheduler, which is created and shared
-across endpoints. So if you use the same name for all your timer
-endpoints, only one scheduler thread pool and thread will be used - but
-you can configure the thread pool to allow more concurrent threads.
-
-You can append query options to the URI in the following format,
-`?option=value&option=value&...`
-
-*Note:* The IN body of the generated exchange is `null`. So
-`exchange.getIn().getBody()` returns `null`.
-
-[[Scheduler-Options]]
-Options
-^^^^^^^
-
-
-// component options: START
-The Scheduler component supports 1 options which are listed below.
-
-
-
-{% raw %}
-[width="100%",cols="2s,1m,8",options="header"]
-|=======================================================================
-| Name | Java Type | Description
-| concurrentTasks | int | Number of threads used by the scheduling thread pool. Is by default using a single thread
-|=======================================================================
-{% endraw %}
-// component options: END
-
-
-
-// endpoint options: START
-The Scheduler component supports 21 endpoint options which are listed below:
-
-{% raw %}
-[width="100%",cols="2s,1,1m,1m,5",options="header"]
-|=======================================================================
-| Name | Group | Default | Java Type | Description
-| name | consumer |  | String | *Required* The name of the scheduler
-| 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.
-| sendEmptyMessageWhenIdle | consumer | false | boolean | If the polling consumer did not poll any files you can enable this option to send an empty message (no body) instead.
-| 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.
-| pollStrategy | consumer (advanced) |  | PollingConsumerPollStrategy | A pluggable org.apache.camel.PollingConsumerPollingStrategy allowing you to provide your custom implementation to control error handling usually occurred during the poll operation before an Exchange have been created and being routed in Camel. In other words the error occurred while the polling was gathering information for instance access to a file network failed so Camel cannot access it to scan for files. The default implementation will log the caused exception at WARN level and ignore it.
-| 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).
-| backoffErrorThreshold | scheduler |  | int | The number of subsequent error polls (failed due some error) that should happen before the backoffMultipler should kick-in.
-| backoffIdleThreshold | scheduler |  | int | The number of subsequent idle polls that should happen before the backoffMultipler should kick-in.
-| backoffMultiplier | scheduler |  | int | To let the scheduled polling consumer backoff if there has been a number of subsequent idles/errors in a row. The multiplier is then the number of polls that will be skipped before the next actual attempt is happening again. When this option is in use then backoffIdleThreshold and/or backoffErrorThreshold must also be configured.
-| concurrentTasks | scheduler | 1 | int | Number of threads used by the scheduling thread pool. Is by default using a single thread
-| delay | scheduler | 500 | long | Milliseconds before the next poll. The default value is 500. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).
-| greedy | scheduler | false | boolean | If greedy is enabled then the ScheduledPollConsumer will run immediately again if the previous run polled 1 or more messages.
-| initialDelay | scheduler | 1000 | long | Milliseconds before the first poll starts. The default value is 1000. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).
-| runLoggingLevel | scheduler | TRACE | LoggingLevel | The consumer logs a start/complete log line when it polls. This option allows you to configure the logging level for that.
-| scheduledExecutorService | scheduler |  | ScheduledExecutorService | Allows for configuring a custom/shared thread pool to use for the consumer. By default each consumer has its own single threaded thread pool. This option allows you to share a thread pool among multiple consumers.
-| scheduler | scheduler | none | ScheduledPollConsumerScheduler | Allow to plugin a custom org.apache.camel.spi.ScheduledPollConsumerScheduler to use as the scheduler for firing when the polling consumer runs. The default implementation uses the ScheduledExecutorService and there is a Quartz2 and Spring based which supports CRON expressions. Notice: If using a custom scheduler then the options for initialDelay useFixedDelay timeUnit and scheduledExecutorService may not be in use. Use the text quartz2 to refer to use the Quartz2 scheduler; and use the text spring to use the Spring based; and use the text myScheduler to refer to a custom scheduler by its id in the Registry. See Quartz2 page for an example.
-| schedulerProperties | scheduler |  | Map | To configure additional properties when using a custom scheduler or any of the Quartz2 Spring based scheduler.
-| startScheduler | scheduler | true | boolean | Whether the scheduler should be auto started.
-| timeUnit | scheduler | MILLISECONDS | TimeUnit | Time unit for initialDelay and delay options.
-| useFixedDelay | scheduler | true | boolean | Controls if fixed delay or fixed rate is used. See ScheduledExecutorService in JDK for details.
-|=======================================================================
-{% endraw %}
-// endpoint options: END
-
-
-[[Scheduler-Moreinformation]]
-More information
-^^^^^^^^^^^^^^^^
-
-This component is a scheduler
-http://camel.apache.org/polling-consumer.html[Polling Consumer] where
-you can find more information about the options above, and examples at
-the http://camel.apache.org/polling-consumer.html[Polling
-Consumer] page.
-
-[[Scheduler-ExchangeProperties]]
-Exchange Properties
-^^^^^^^^^^^^^^^^^^^
-
-When the timer is fired, it adds the following information as properties
-to the `Exchange`:
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Name |Type |Description
-
-|`Exchange.TIMER_NAME` |`String` |The value of the `name` option.
-
-|`Exchange.TIMER_FIRED_TIME` |`Date` |The time when the consumer fired.
-|=======================================================================
-
-[[Scheduler-Sample]]
-Sample
-^^^^^^
-
-To set up a route that generates an event every 60 seconds:
-
-[source,java]
-------------------------------------------------------------------------------
-   from("scheduler://foo?period=60s").to("bean:myBean?method=someMethodName");
-------------------------------------------------------------------------------
-
- 
-
-The above route will generate an event and then invoke the
-`someMethodName` method on the bean called `myBean` in the
-link:registry.html[Registry] such as JNDI or link:spring.html[Spring].
-
-And the route in Spring DSL:
-
-[source,xml]
--------------------------------------------------
-  <route>
-    <from uri="scheduler://foo?period=60s"/>
-    <to uri="bean:myBean?method=someMethodName"/>
-  </route>
--------------------------------------------------
-
- 
-
-[[Scheduler-Forcingtheschedulertotriggerimmediatelywhencompleted]]
-Forcing the scheduler to trigger immediately when completed
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-To let the scheduler trigger as soon as the previous task is complete,
-you can set the option greedy=true. But beware then the scheduler will
-keep firing all the time. So use this with caution.
-
-[[Scheduler-Forcingtheschedulertobeidle]]
-Forcing the scheduler to be idle
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-There can be use cases where you want the scheduler to trigger and be
-greedy. But sometimes you want "tell the scheduler" that there was no
-task to poll, so the scheduler can change into idle mode using the
-backoff options. To do this you would need to set a property on the
-exchange with the key `Exchange.SCHEDULER_POLLED_MESSAGES` to a boolean
-value of false. This will cause the consumer to indicate that there was
-no messages polled. 
-
-The consumer will otherwise as by default return 1 message polled to the
-scheduler, every time the consumer has completed processing the
-exchange.
-
- 
-
-[[Scheduler-SeeAlso]]
-See Also
-^^^^^^^^
-
-* link:configuring-camel.html[Configuring Camel]
-* link:component.html[Component]
-* link:endpoint.html[Endpoint]
-* link:getting-started.html[Getting Started]
-
-* link:timer.html[Timer]
-* link:quartz.html[Quartz]
-

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/camel-core/src/main/docs/seda-component.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/seda-component.adoc b/camel-core/src/main/docs/seda-component.adoc
new file mode 100644
index 0000000..6f60ec2
--- /dev/null
+++ b/camel-core/src/main/docs/seda-component.adoc
@@ -0,0 +1,260 @@
+[[SEDA-SEDAComponent]]
+SEDA Component
+~~~~~~~~~~~~~~
+
+The *seda:* component provides asynchronous
+http://www.eecs.harvard.edu/~mdw/proj/seda/[SEDA] behavior, so that
+messages are exchanged on a
+http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/BlockingQueue.html[BlockingQueue]
+and consumers are invoked in a separate thread from the producer.
+
+Note that queues are only visible within a _single_
+link:camelcontext.html[CamelContext]. If you want to communicate across
+`CamelContext` instances (for example, communicating between Web
+applications), see the link:vm.html[VM] component.
+
+This component does not implement any kind of persistence or recovery,
+if the VM terminates while messages are yet to be processed. If you need
+persistence, reliability or distributed SEDA, try using either
+link:jms.html[JMS] or link:activemq.html[ActiveMQ].
+
+TIP:*Synchronous*
+The link:direct.html[Direct] component provides synchronous invocation
+of any consumers when a producer sends a message exchange.
+
+[[SEDA-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+-----------------------
+seda:someName[?options]
+-----------------------
+
+Where *someName* can be any string that uniquely identifies the endpoint
+within the current link:camelcontext.html[CamelContext].
+
+You can append query options to the URI in the following format:
+`?option=value&option=value&…`
+
+[[SEDA-Options]]
+Options
+^^^^^^^
+
+
+// component options: START
+The SEDA component supports 3 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2s,1m,8",options="header"]
+|=======================================================================
+| Name | Java Type | Description
+| queueSize | int | Sets the default maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
+| concurrentConsumers | int | Sets the default number of concurrent threads processing exchanges.
+| defaultQueueFactory | Exchange> | Sets the default queue factory.
+|=======================================================================
+{% endraw %}
+// component options: END
+
+
+
+// endpoint options: START
+The SEDA component supports 17 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 queue
+| size | common | 2147483647 | int | The maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
+| 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.
+| concurrentConsumers | consumer | 1 | int | Number of concurrent threads processing exchanges.
+| 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.
+| limitConcurrentConsumers | consumer (advanced) | true | boolean | Whether to limit the number of concurrentConsumers to the maximum of 500. By default an exception will be thrown if an endpoint is configured with a greater number. You can disable that check by turning this option off.
+| multipleConsumers | consumer (advanced) | false | boolean | Specifies whether multiple consumers are allowed. If enabled you can use SEDA for Publish-Subscribe messaging. That is you can send a message to the SEDA queue and have each consumer receive a copy of the message. When enabled this option should be specified on every consumer endpoint.
+| pollTimeout | consumer (advanced) | 1000 | int | The timeout used when polling. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown.
+| purgeWhenStopping | consumer (advanced) | false | boolean | Whether to purge the task queue when stopping the consumer/route. This allows to stop faster as any pending messages on the queue is discarded.
+| blockWhenFull | producer | false | boolean | Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By default an exception will be thrown stating that the queue is full. By enabling this option the calling thread will instead block and wait until the message can be accepted.
+| discardIfNoConsumers | producer | false | boolean | Whether the producer should discard the message (do not add the message to the queue) when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
+| failIfNoConsumers | producer | false | boolean | Whether the producer should fail by throwing an exception when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
+| timeout | producer | 30000 | long | Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value.
+| waitForTaskToComplete | producer | IfReplyExpected | WaitForTaskToComplete | Option to specify whether the caller should wait for the async task to complete or not before continuing. The following three options are supported: Always Never or IfReplyExpected. The first two values are self-explanatory. The last value IfReplyExpected will only wait if the message is Request Reply based. The default option is IfReplyExpected.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
+| queue | advanced |  | BlockingQueue | Define the queue instance which will be used by the endpoint. This option is only for rare use-cases where you want to use a custom queue instance.
+| 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
+
+
+[[SEDA-ChoosingBlockingQueueimplementation]]
+Choosing BlockingQueue implementation
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.12*
+
+By default, the SEDA component always intantiates LinkedBlockingQueue,
+but you can use different implementation, you can reference your own
+BlockingQueue implementation, in this case the size option is not used
+
+[source,java]
+-----------------------------------------------------------
+<bean id="arrayQueue" class="java.util.ArrayBlockingQueue">
+<constructor-arg index="0" value="10" ><!-- size -->
+<constructor-arg index="1" value="true" ><!-- fairness -->
+</bean>
+<!-- ... and later -->
+<from>seda:array?queue=#arrayQueue</from>
+-----------------------------------------------------------
+
+Or you can reference a BlockingQueueFactory implementation, 3
+implementations are provided LinkedBlockingQueueFactory,
+ArrayBlockingQueueFactory and PriorityBlockingQueueFactory:
+
+[source,java]
+-----------------------------------------------------------------------------------------------------
+<bean id="priorityQueueFactory" class="org.apache.camel.component.seda.PriorityBlockingQueueFactory">
+<property name="comparator">
+<bean class="org.apache.camel.demo.MyExchangeComparator" />
+</property>
+</bean>
+<!-- ... and later -->
+<from>seda:priority?queueFactory=#priorityQueueFactory&size=100</from>
+-----------------------------------------------------------------------------------------------------
+
+[[SEDA-UseofRequestReply]]
+Use of Request Reply
+^^^^^^^^^^^^^^^^^^^^
+
+The link:seda.html[SEDA] component supports using
+link:request-reply.html[Request Reply], where the caller will wait for
+the link:async.html[Async] route to complete. For instance:
+
+[source,java]
+-------------------------------------------------------------------------
+from("mina:tcp://0.0.0.0:9876?textline=true&sync=true").to("seda:input");
+
+from("seda:input").to("bean:processInput").to("bean:createResponse");
+-------------------------------------------------------------------------
+
+In the route above, we have a TCP listener on port 9876 that accepts
+incoming requests. The request is routed to the `seda:input` queue. As
+it is a link:request-reply.html[Request Reply] message, we wait for the
+response. When the consumer on the `seda:input` queue is complete, it
+copies the response to the original message response.
+
+NOTE:*until 2.2: Works only with 2 endpoints*
+Using link:request-reply.html[Request Reply] over link:seda.html[SEDA]
+or link:vm.html[VM] only works with 2 endpoints. You *cannot* chain
+endpoints by sending to A -> B -> C etc. Only between A -> B. The reason
+is the implementation logic is fairly simple. To support 3+ endpoints
+makes the logic much more complex to handle ordering and notification
+between the waiting threads properly.
+This has been improved in *Camel 2.3* onwards, which allows you to chain
+as many endpoints as you like.
+
+[[SEDA-Concurrentconsumers]]
+Concurrent consumers
+^^^^^^^^^^^^^^^^^^^^
+
+By default, the SEDA endpoint uses a single consumer thread, but you can
+configure it to use concurrent consumer threads. So instead of thread
+pools you can use:
+
+[source,java]
+---------------------------------------------------------
+from("seda:stageName?concurrentConsumers=5").process(...)
+---------------------------------------------------------
+
+As for the difference between the two, note a _thread pool_ can
+increase/shrink dynamically at runtime depending on load, whereas the
+number of concurrent consumers is always fixed.
+
+[[SEDA-Threadpools]]
+Thread pools
+^^^^^^^^^^^^
+
+Be aware that adding a thread pool to a SEDA endpoint by doing something
+like:
+
+[source,java]
+---------------------------------------------
+from("seda:stageName").thread(5).process(...)
+---------------------------------------------
+
+Can wind up with two `BlockQueues`: one from the SEDA endpoint, and one
+from the workqueue of the thread pool, which may not be what you want.
+Instead, you might wish to configure a link:direct.html[Direct] endpoint
+with a thread pool, which can process messages both synchronously and
+asynchronously. For example:
+
+[source,java]
+-----------------------------------------------
+from("direct:stageName").thread(5).process(...)
+-----------------------------------------------
+
+You can also directly configure number of threads that process messages
+on a SEDA endpoint using the `concurrentConsumers` option.
+
+[[SEDA-Sample]]
+Sample
+^^^^^^
+
+In the route below we use the SEDA queue to send the request to this
+async queue to be able to send a fire-and-forget message for further
+processing in another thread, and return a constant reply in this thread
+to the original caller.
+
+Here we send a Hello World message and expects the reply to be OK.
+
+The "Hello World" message will be consumed from the SEDA queue from
+another thread for further processing. Since this is from a unit test,
+it will be sent to a `mock` endpoint where we can do assertions in the
+unit test.
+
+[[SEDA-UsingmultipleConsumers]]
+Using multipleConsumers
+^^^^^^^^^^^^^^^^^^^^^^^
+
+*Available as of Camel 2.2*
+
+In this example we have defined two consumers and registered them as
+spring beans.
+
+Since we have specified *multipleConsumers=true* on the seda foo
+endpoint we can have those two consumers receive their own copy of the
+message as a kind of pub-sub style messaging.
+
+As the beans are part of an unit test they simply send the message to a
+mock endpoint, but notice how we can use @Consume to consume from the
+seda queue.
+
+[[SEDA-Extractingqueueinformation.]]
+Extracting queue information.
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+If needed, information such as queue size, etc. can be obtained without
+using JMX in this fashion:
+
+[source,java]
+-----------------------------------------------------
+SedaEndpoint seda = context.getEndpoint("seda:xxxx");
+int size = seda.getExchanges().size();
+-----------------------------------------------------
+
+[[SEDA-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:vm.html[VM]
+* link:disruptor.html[Disruptor]
+* link:direct.html[Direct]
+* link:async.html[Async]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/camel-core/src/main/docs/seda.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/seda.adoc b/camel-core/src/main/docs/seda.adoc
deleted file mode 100644
index 6f60ec2..0000000
--- a/camel-core/src/main/docs/seda.adoc
+++ /dev/null
@@ -1,260 +0,0 @@
-[[SEDA-SEDAComponent]]
-SEDA Component
-~~~~~~~~~~~~~~
-
-The *seda:* component provides asynchronous
-http://www.eecs.harvard.edu/~mdw/proj/seda/[SEDA] behavior, so that
-messages are exchanged on a
-http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/BlockingQueue.html[BlockingQueue]
-and consumers are invoked in a separate thread from the producer.
-
-Note that queues are only visible within a _single_
-link:camelcontext.html[CamelContext]. If you want to communicate across
-`CamelContext` instances (for example, communicating between Web
-applications), see the link:vm.html[VM] component.
-
-This component does not implement any kind of persistence or recovery,
-if the VM terminates while messages are yet to be processed. If you need
-persistence, reliability or distributed SEDA, try using either
-link:jms.html[JMS] or link:activemq.html[ActiveMQ].
-
-TIP:*Synchronous*
-The link:direct.html[Direct] component provides synchronous invocation
-of any consumers when a producer sends a message exchange.
-
-[[SEDA-URIformat]]
-URI format
-^^^^^^^^^^
-
-[source,java]
------------------------
-seda:someName[?options]
------------------------
-
-Where *someName* can be any string that uniquely identifies the endpoint
-within the current link:camelcontext.html[CamelContext].
-
-You can append query options to the URI in the following format:
-`?option=value&option=value&…`
-
-[[SEDA-Options]]
-Options
-^^^^^^^
-
-
-// component options: START
-The SEDA component supports 3 options which are listed below.
-
-
-
-{% raw %}
-[width="100%",cols="2s,1m,8",options="header"]
-|=======================================================================
-| Name | Java Type | Description
-| queueSize | int | Sets the default maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
-| concurrentConsumers | int | Sets the default number of concurrent threads processing exchanges.
-| defaultQueueFactory | Exchange> | Sets the default queue factory.
-|=======================================================================
-{% endraw %}
-// component options: END
-
-
-
-// endpoint options: START
-The SEDA component supports 17 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 queue
-| size | common | 2147483647 | int | The maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
-| 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.
-| concurrentConsumers | consumer | 1 | int | Number of concurrent threads processing exchanges.
-| 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.
-| limitConcurrentConsumers | consumer (advanced) | true | boolean | Whether to limit the number of concurrentConsumers to the maximum of 500. By default an exception will be thrown if an endpoint is configured with a greater number. You can disable that check by turning this option off.
-| multipleConsumers | consumer (advanced) | false | boolean | Specifies whether multiple consumers are allowed. If enabled you can use SEDA for Publish-Subscribe messaging. That is you can send a message to the SEDA queue and have each consumer receive a copy of the message. When enabled this option should be specified on every consumer endpoint.
-| pollTimeout | consumer (advanced) | 1000 | int | The timeout used when polling. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown.
-| purgeWhenStopping | consumer (advanced) | false | boolean | Whether to purge the task queue when stopping the consumer/route. This allows to stop faster as any pending messages on the queue is discarded.
-| blockWhenFull | producer | false | boolean | Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By default an exception will be thrown stating that the queue is full. By enabling this option the calling thread will instead block and wait until the message can be accepted.
-| discardIfNoConsumers | producer | false | boolean | Whether the producer should discard the message (do not add the message to the queue) when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
-| failIfNoConsumers | producer | false | boolean | Whether the producer should fail by throwing an exception when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
-| timeout | producer | 30000 | long | Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value.
-| waitForTaskToComplete | producer | IfReplyExpected | WaitForTaskToComplete | Option to specify whether the caller should wait for the async task to complete or not before continuing. The following three options are supported: Always Never or IfReplyExpected. The first two values are self-explanatory. The last value IfReplyExpected will only wait if the message is Request Reply based. The default option is IfReplyExpected.
-| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
-| queue | advanced |  | BlockingQueue | Define the queue instance which will be used by the endpoint. This option is only for rare use-cases where you want to use a custom queue instance.
-| 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
-
-
-[[SEDA-ChoosingBlockingQueueimplementation]]
-Choosing BlockingQueue implementation
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-*Available as of Camel 2.12*
-
-By default, the SEDA component always intantiates LinkedBlockingQueue,
-but you can use different implementation, you can reference your own
-BlockingQueue implementation, in this case the size option is not used
-
-[source,java]
------------------------------------------------------------
-<bean id="arrayQueue" class="java.util.ArrayBlockingQueue">
-<constructor-arg index="0" value="10" ><!-- size -->
-<constructor-arg index="1" value="true" ><!-- fairness -->
-</bean>
-<!-- ... and later -->
-<from>seda:array?queue=#arrayQueue</from>
------------------------------------------------------------
-
-Or you can reference a BlockingQueueFactory implementation, 3
-implementations are provided LinkedBlockingQueueFactory,
-ArrayBlockingQueueFactory and PriorityBlockingQueueFactory:
-
-[source,java]
------------------------------------------------------------------------------------------------------
-<bean id="priorityQueueFactory" class="org.apache.camel.component.seda.PriorityBlockingQueueFactory">
-<property name="comparator">
-<bean class="org.apache.camel.demo.MyExchangeComparator" />
-</property>
-</bean>
-<!-- ... and later -->
-<from>seda:priority?queueFactory=#priorityQueueFactory&size=100</from>
------------------------------------------------------------------------------------------------------
-
-[[SEDA-UseofRequestReply]]
-Use of Request Reply
-^^^^^^^^^^^^^^^^^^^^
-
-The link:seda.html[SEDA] component supports using
-link:request-reply.html[Request Reply], where the caller will wait for
-the link:async.html[Async] route to complete. For instance:
-
-[source,java]
--------------------------------------------------------------------------
-from("mina:tcp://0.0.0.0:9876?textline=true&sync=true").to("seda:input");
-
-from("seda:input").to("bean:processInput").to("bean:createResponse");
--------------------------------------------------------------------------
-
-In the route above, we have a TCP listener on port 9876 that accepts
-incoming requests. The request is routed to the `seda:input` queue. As
-it is a link:request-reply.html[Request Reply] message, we wait for the
-response. When the consumer on the `seda:input` queue is complete, it
-copies the response to the original message response.
-
-NOTE:*until 2.2: Works only with 2 endpoints*
-Using link:request-reply.html[Request Reply] over link:seda.html[SEDA]
-or link:vm.html[VM] only works with 2 endpoints. You *cannot* chain
-endpoints by sending to A -> B -> C etc. Only between A -> B. The reason
-is the implementation logic is fairly simple. To support 3+ endpoints
-makes the logic much more complex to handle ordering and notification
-between the waiting threads properly.
-This has been improved in *Camel 2.3* onwards, which allows you to chain
-as many endpoints as you like.
-
-[[SEDA-Concurrentconsumers]]
-Concurrent consumers
-^^^^^^^^^^^^^^^^^^^^
-
-By default, the SEDA endpoint uses a single consumer thread, but you can
-configure it to use concurrent consumer threads. So instead of thread
-pools you can use:
-
-[source,java]
----------------------------------------------------------
-from("seda:stageName?concurrentConsumers=5").process(...)
----------------------------------------------------------
-
-As for the difference between the two, note a _thread pool_ can
-increase/shrink dynamically at runtime depending on load, whereas the
-number of concurrent consumers is always fixed.
-
-[[SEDA-Threadpools]]
-Thread pools
-^^^^^^^^^^^^
-
-Be aware that adding a thread pool to a SEDA endpoint by doing something
-like:
-
-[source,java]
----------------------------------------------
-from("seda:stageName").thread(5).process(...)
----------------------------------------------
-
-Can wind up with two `BlockQueues`: one from the SEDA endpoint, and one
-from the workqueue of the thread pool, which may not be what you want.
-Instead, you might wish to configure a link:direct.html[Direct] endpoint
-with a thread pool, which can process messages both synchronously and
-asynchronously. For example:
-
-[source,java]
------------------------------------------------
-from("direct:stageName").thread(5).process(...)
------------------------------------------------
-
-You can also directly configure number of threads that process messages
-on a SEDA endpoint using the `concurrentConsumers` option.
-
-[[SEDA-Sample]]
-Sample
-^^^^^^
-
-In the route below we use the SEDA queue to send the request to this
-async queue to be able to send a fire-and-forget message for further
-processing in another thread, and return a constant reply in this thread
-to the original caller.
-
-Here we send a Hello World message and expects the reply to be OK.
-
-The "Hello World" message will be consumed from the SEDA queue from
-another thread for further processing. Since this is from a unit test,
-it will be sent to a `mock` endpoint where we can do assertions in the
-unit test.
-
-[[SEDA-UsingmultipleConsumers]]
-Using multipleConsumers
-^^^^^^^^^^^^^^^^^^^^^^^
-
-*Available as of Camel 2.2*
-
-In this example we have defined two consumers and registered them as
-spring beans.
-
-Since we have specified *multipleConsumers=true* on the seda foo
-endpoint we can have those two consumers receive their own copy of the
-message as a kind of pub-sub style messaging.
-
-As the beans are part of an unit test they simply send the message to a
-mock endpoint, but notice how we can use @Consume to consume from the
-seda queue.
-
-[[SEDA-Extractingqueueinformation.]]
-Extracting queue information.
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-If needed, information such as queue size, etc. can be obtained without
-using JMX in this fashion:
-
-[source,java]
------------------------------------------------------
-SedaEndpoint seda = context.getEndpoint("seda:xxxx");
-int size = seda.getExchanges().size();
------------------------------------------------------
-
-[[SEDA-SeeAlso]]
-See Also
-^^^^^^^^
-
-* link:configuring-camel.html[Configuring Camel]
-* link:component.html[Component]
-* link:endpoint.html[Endpoint]
-* link:getting-started.html[Getting Started]
-
-* link:vm.html[VM]
-* link:disruptor.html[Disruptor]
-* link:direct.html[Direct]
-* link:async.html[Async]
-

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/camel-core/src/main/docs/stub-component.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/stub-component.adoc b/camel-core/src/main/docs/stub-component.adoc
new file mode 100644
index 0000000..8760d06
--- /dev/null
+++ b/camel-core/src/main/docs/stub-component.adoc
@@ -0,0 +1,103 @@
+[[Stub-StubComponent]]
+Stub Component
+~~~~~~~~~~~~~~
+
+*Available as of Camel 2.10*
+
+The *stub:* component provides a simple way to stub out any physical
+endpoints while in development or testing, allowing you for example to
+run a route without needing to actually connect to a specific
+link:mail.html[SMTP] or link:http.html[Http] endpoint. Just add *stub:*
+in front of any endpoint URI to stub out the endpoint.
+
+Internally the Stub component creates link:vm.html[VM] endpoints. The
+main difference between link:stub.html[Stub] and link:vm.html[VM] is
+that link:vm.html[VM] will validate the URI and parameters you give it,
+so putting vm: in front of a typical URI with query arguments will
+usually fail. Stub won't though, as it basically ignores all query
+parameters to let you quickly stub out one or more endpoints in your
+route temporarily.
+
+[[Stub-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+------------
+stub:someUri
+------------
+
+Where *`someUri`* can be any URI with any query parameters.
+
+[[Stub-Options]]
+Options
+^^^^^^^
+
+
+// component options: START
+The Stub component supports 3 options which are listed below.
+
+
+
+{% raw %}
+[width="100%",cols="2s,1m,8",options="header"]
+|=======================================================================
+| Name | Java Type | Description
+| queueSize | int | Sets the default maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
+| concurrentConsumers | int | Sets the default number of concurrent threads processing exchanges.
+| defaultQueueFactory | Exchange> | Sets the default queue factory.
+|=======================================================================
+{% endraw %}
+// component options: END
+
+
+
+// endpoint options: START
+The Stub component supports 17 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 queue
+| size | common | 2147483647 | int | The maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
+| 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.
+| concurrentConsumers | consumer | 1 | int | Number of concurrent threads processing exchanges.
+| 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.
+| limitConcurrentConsumers | consumer (advanced) | true | boolean | Whether to limit the number of concurrentConsumers to the maximum of 500. By default an exception will be thrown if an endpoint is configured with a greater number. You can disable that check by turning this option off.
+| multipleConsumers | consumer (advanced) | false | boolean | Specifies whether multiple consumers are allowed. If enabled you can use SEDA for Publish-Subscribe messaging. That is you can send a message to the SEDA queue and have each consumer receive a copy of the message. When enabled this option should be specified on every consumer endpoint.
+| pollTimeout | consumer (advanced) | 1000 | int | The timeout used when polling. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown.
+| purgeWhenStopping | consumer (advanced) | false | boolean | Whether to purge the task queue when stopping the consumer/route. This allows to stop faster as any pending messages on the queue is discarded.
+| blockWhenFull | producer | false | boolean | Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By default an exception will be thrown stating that the queue is full. By enabling this option the calling thread will instead block and wait until the message can be accepted.
+| discardIfNoConsumers | producer | false | boolean | Whether the producer should discard the message (do not add the message to the queue) when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
+| failIfNoConsumers | producer | false | boolean | Whether the producer should fail by throwing an exception when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
+| timeout | producer | 30000 | long | Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value.
+| waitForTaskToComplete | producer | IfReplyExpected | WaitForTaskToComplete | Option to specify whether the caller should wait for the async task to complete or not before continuing. The following three options are supported: Always Never or IfReplyExpected. The first two values are self-explanatory. The last value IfReplyExpected will only wait if the message is Request Reply based. The default option is IfReplyExpected.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
+| queue | advanced |  | BlockingQueue | Define the queue instance which will be used by the endpoint. This option is only for rare use-cases where you want to use a custom queue instance.
+| 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
+
+
+
+[[Stub-Examples]]
+Examples
+^^^^^^^^
+
+Here are a few samples:
+
+* stub:smtp://somehost.foo.com?user=whatnot&something=else
+*
+stub:http://somehost.bar.com/something[http://somehost.bar.com/something]
+
+[[Stub-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/9c0b7baf/camel-core/src/main/docs/stub.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/stub.adoc b/camel-core/src/main/docs/stub.adoc
deleted file mode 100644
index 8760d06..0000000
--- a/camel-core/src/main/docs/stub.adoc
+++ /dev/null
@@ -1,103 +0,0 @@
-[[Stub-StubComponent]]
-Stub Component
-~~~~~~~~~~~~~~
-
-*Available as of Camel 2.10*
-
-The *stub:* component provides a simple way to stub out any physical
-endpoints while in development or testing, allowing you for example to
-run a route without needing to actually connect to a specific
-link:mail.html[SMTP] or link:http.html[Http] endpoint. Just add *stub:*
-in front of any endpoint URI to stub out the endpoint.
-
-Internally the Stub component creates link:vm.html[VM] endpoints. The
-main difference between link:stub.html[Stub] and link:vm.html[VM] is
-that link:vm.html[VM] will validate the URI and parameters you give it,
-so putting vm: in front of a typical URI with query arguments will
-usually fail. Stub won't though, as it basically ignores all query
-parameters to let you quickly stub out one or more endpoints in your
-route temporarily.
-
-[[Stub-URIformat]]
-URI format
-^^^^^^^^^^
-
-[source,java]
-------------
-stub:someUri
-------------
-
-Where *`someUri`* can be any URI with any query parameters.
-
-[[Stub-Options]]
-Options
-^^^^^^^
-
-
-// component options: START
-The Stub component supports 3 options which are listed below.
-
-
-
-{% raw %}
-[width="100%",cols="2s,1m,8",options="header"]
-|=======================================================================
-| Name | Java Type | Description
-| queueSize | int | Sets the default maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
-| concurrentConsumers | int | Sets the default number of concurrent threads processing exchanges.
-| defaultQueueFactory | Exchange> | Sets the default queue factory.
-|=======================================================================
-{% endraw %}
-// component options: END
-
-
-
-// endpoint options: START
-The Stub component supports 17 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 queue
-| size | common | 2147483647 | int | The maximum capacity of the SEDA queue (i.e. the number of messages it can hold).
-| 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.
-| concurrentConsumers | consumer | 1 | int | Number of concurrent threads processing exchanges.
-| 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.
-| limitConcurrentConsumers | consumer (advanced) | true | boolean | Whether to limit the number of concurrentConsumers to the maximum of 500. By default an exception will be thrown if an endpoint is configured with a greater number. You can disable that check by turning this option off.
-| multipleConsumers | consumer (advanced) | false | boolean | Specifies whether multiple consumers are allowed. If enabled you can use SEDA for Publish-Subscribe messaging. That is you can send a message to the SEDA queue and have each consumer receive a copy of the message. When enabled this option should be specified on every consumer endpoint.
-| pollTimeout | consumer (advanced) | 1000 | int | The timeout used when polling. When a timeout occurs the consumer can check whether it is allowed to continue running. Setting a lower value allows the consumer to react more quickly upon shutdown.
-| purgeWhenStopping | consumer (advanced) | false | boolean | Whether to purge the task queue when stopping the consumer/route. This allows to stop faster as any pending messages on the queue is discarded.
-| blockWhenFull | producer | false | boolean | Whether a thread that sends messages to a full SEDA queue will block until the queue's capacity is no longer exhausted. By default an exception will be thrown stating that the queue is full. By enabling this option the calling thread will instead block and wait until the message can be accepted.
-| discardIfNoConsumers | producer | false | boolean | Whether the producer should discard the message (do not add the message to the queue) when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
-| failIfNoConsumers | producer | false | boolean | Whether the producer should fail by throwing an exception when sending to a queue with no active consumers. Only one of the options discardIfNoConsumers and failIfNoConsumers can be enabled at the same time.
-| timeout | producer | 30000 | long | Timeout (in milliseconds) before a SEDA producer will stop waiting for an asynchronous task to complete. You can disable timeout by using 0 or a negative value.
-| waitForTaskToComplete | producer | IfReplyExpected | WaitForTaskToComplete | Option to specify whether the caller should wait for the async task to complete or not before continuing. The following three options are supported: Always Never or IfReplyExpected. The first two values are self-explanatory. The last value IfReplyExpected will only wait if the message is Request Reply based. The default option is IfReplyExpected.
-| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
-| queue | advanced |  | BlockingQueue | Define the queue instance which will be used by the endpoint. This option is only for rare use-cases where you want to use a custom queue instance.
-| 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
-
-
-
-[[Stub-Examples]]
-Examples
-^^^^^^^^
-
-Here are a few samples:
-
-* stub:smtp://somehost.foo.com?user=whatnot&something=else
-*
-stub:http://somehost.bar.com/something[http://somehost.bar.com/something]
-
-[[Stub-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/9c0b7baf/camel-core/src/main/docs/test-component.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/test-component.adoc b/camel-core/src/main/docs/test-component.adoc
new file mode 100644
index 0000000..a8ac054
--- /dev/null
+++ b/camel-core/src/main/docs/test-component.adoc
@@ -0,0 +1,123 @@
+[[Test-TestComponent]]
+Test Component
+~~~~~~~~~~~~~~
+
+link:testing.html[Testing] of distributed and asynchronous processing is
+notoriously difficult. The link:mock.html[Mock], link:test.html[Test]
+and link:dataset.html[DataSet] endpoints work great with the
+link:testing.html[Camel Testing Framework] to simplify your unit and
+integration testing using
+link:enterprise-integration-patterns.html[Enterprise Integration
+Patterns] and Camel's large range of link:components.html[Components]
+together with the powerful link:bean-integration.html[Bean Integration].
+
+The *test* component extends the link:mock.html[Mock] component to
+support pulling messages from another endpoint on startup to set the
+expected message bodies on the underlying link:mock.html[Mock] endpoint.
+That is, you use the test endpoint in a route and messages arriving on
+it will be implicitly compared to some expected messages extracted from
+some other location.
+
+So you can use, for example, an expected set of message bodies as files.
+This will then set up a properly configured link:mock.html[Mock]
+endpoint, which is only valid if the received messages match the number
+of expected messages and their message payloads are equal.
+
+Maven users will need to add the following dependency to their `pom.xml`
+for this component when using *Camel 2.8* or older:
+
+[source,xml]
+------------------------------------------------------------
+<dependency>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-spring</artifactId>
+    <version>x.x.x</version>
+    <!-- use the same version as your Camel core version -->
+</dependency>
+------------------------------------------------------------
+
+From Camel 2.9 onwards the link:test.html[Test] component is provided
+directly in the camel-core.
+
+[[Test-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+--------------------------------
+test:expectedMessagesEndpointUri
+--------------------------------
+
+Where *expectedMessagesEndpointUri* refers to some other
+link:component.html[Component] URI that the expected message bodies are
+pulled from before starting the test.
+
+[[Test-URIOptions]]
+URI Options
+^^^^^^^^^^^
+
+
+// component options: START
+The Test component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The Test component supports 16 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| name | producer |  | String | *Required* Name of endpoint to lookup in the registry to use for polling messages used for testing
+| anyOrder | producer | false | boolean | Whether the expected messages should arrive in the same order or can be in any order.
+| assertPeriod | producer | 0 | long | Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid. This is used for example to assert that exactly a number of messages arrives. For example if link expectedMessageCount(int) was set to 5 then the assertion is satisfied when 5 or more message arrives. To ensure that exactly 5 messages arrives then you would need to wait a little period to ensure no further message arrives. This is what you can use this link setAssertPeriod(long) method for. By default this period is disabled.
+| delimiter | producer |  | String | The split delimiter to use when split is enabled. By default the delimiter is new line based. The delimiter can be a regular expression.
+| expectedCount | producer | -1 | int | Specifies the expected number of message exchanges that should be received by this endpoint. Beware: If you want to expect that 0 messages then take extra care as 0 matches when the tests starts so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use link setAssertPeriod(long). An alternative is to use NotifyBuilder and use the notifier to know when Camel is done routing some messages before you call the link assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert period to speedup testing times. If you want to assert that exactly n'th message arrives to this mock endpoint then see also the link setAssertPeriod(long) method for further details.
+| reportGroup | producer |  | int | A number that is used to turn on throughput logging based on groups of the size.
+| resultMinimumWaitTime | producer | 0 | long | Sets the minimum expected amount of time (in millis) the link assertIsSatisfied() will wait on a latch until it is satisfied
+| resultWaitTime | producer | 0 | long | Sets the maximum amount of time (in millis) the link assertIsSatisfied() will wait on a latch until it is satisfied
+| retainFirst | producer | -1 | int | Specifies to only retain the first n'th number of received Exchanges. This is used when testing with big data to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation then the link getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges and have configured to only retain the first 10 Exchanges then the link getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the link getExchanges() and link getReceivedExchanges() methods. When using this method then some of the other expectation methods is not supported for example the link expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both link setRetainFirst(int) and link setRetainLast(int) methods to limit both the first and last received.
+| retainLast | producer | -1 | int | Specifies to only retain the last n'th number of received Exchanges. This is used when testing with big data to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation then the link getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges and have configured to only retain the last 20 Exchanges then the link getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the link getExchanges() and link getReceivedExchanges() methods. When using this method then some of the other expectation methods is not supported for example the link expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both link setRetainFirst(int) and link setRetainLast(int) methods to limit both the first and last received.
+| sleepForEmptyTest | producer | 0 | long | Allows a sleep to be specified to wait to check that this endpoint really is empty when link expectedMessageCount(int) is called with zero
+| split | producer | false | boolean | If enabled the the messages loaded from the test endpoint will be split using \n\r delimiters (new lines) so each line is an expected message. For example to use a file endpoint to load a file where each line is an expected message.
+| timeout | producer | 2000 | long | The timeout to use when polling for message bodies from the URI
+| copyOnExchange | producer (advanced) | true | boolean | Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. Is by 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
+
+
+[[Test-Example]]
+Example
+^^^^^^^
+
+For example, you could write a test case as follows:
+
+[source,java]
+--------------------------------------------------
+from("seda:someEndpoint").
+  to("test:file://data/expectedOutput?noop=true");
+--------------------------------------------------
+
+If your test then invokes the
+http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/mock/MockEndpoint.html#assertIsSatisfied(org.apache.camel.CamelContext)[MockEndpoint.assertIsSatisfied(camelContext)
+method], your test case will perform the necessary assertions.
+
+To see how you can set other expectations on the test endpoint, see the
+link:mock.html[Mock] component.
+
+[[Test-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:spring-testing.html[Spring Testing]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/camel-core/src/main/docs/test.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/test.adoc b/camel-core/src/main/docs/test.adoc
deleted file mode 100644
index a8ac054..0000000
--- a/camel-core/src/main/docs/test.adoc
+++ /dev/null
@@ -1,123 +0,0 @@
-[[Test-TestComponent]]
-Test Component
-~~~~~~~~~~~~~~
-
-link:testing.html[Testing] of distributed and asynchronous processing is
-notoriously difficult. The link:mock.html[Mock], link:test.html[Test]
-and link:dataset.html[DataSet] endpoints work great with the
-link:testing.html[Camel Testing Framework] to simplify your unit and
-integration testing using
-link:enterprise-integration-patterns.html[Enterprise Integration
-Patterns] and Camel's large range of link:components.html[Components]
-together with the powerful link:bean-integration.html[Bean Integration].
-
-The *test* component extends the link:mock.html[Mock] component to
-support pulling messages from another endpoint on startup to set the
-expected message bodies on the underlying link:mock.html[Mock] endpoint.
-That is, you use the test endpoint in a route and messages arriving on
-it will be implicitly compared to some expected messages extracted from
-some other location.
-
-So you can use, for example, an expected set of message bodies as files.
-This will then set up a properly configured link:mock.html[Mock]
-endpoint, which is only valid if the received messages match the number
-of expected messages and their message payloads are equal.
-
-Maven users will need to add the following dependency to their `pom.xml`
-for this component when using *Camel 2.8* or older:
-
-[source,xml]
-------------------------------------------------------------
-<dependency>
-    <groupId>org.apache.camel</groupId>
-    <artifactId>camel-spring</artifactId>
-    <version>x.x.x</version>
-    <!-- use the same version as your Camel core version -->
-</dependency>
-------------------------------------------------------------
-
-From Camel 2.9 onwards the link:test.html[Test] component is provided
-directly in the camel-core.
-
-[[Test-URIformat]]
-URI format
-^^^^^^^^^^
-
-[source,java]
---------------------------------
-test:expectedMessagesEndpointUri
---------------------------------
-
-Where *expectedMessagesEndpointUri* refers to some other
-link:component.html[Component] URI that the expected message bodies are
-pulled from before starting the test.
-
-[[Test-URIOptions]]
-URI Options
-^^^^^^^^^^^
-
-
-// component options: START
-The Test component has no options.
-// component options: END
-
-
-
-// endpoint options: START
-The Test component supports 16 endpoint options which are listed below:
-
-{% raw %}
-[width="100%",cols="2s,1,1m,1m,5",options="header"]
-|=======================================================================
-| Name | Group | Default | Java Type | Description
-| name | producer |  | String | *Required* Name of endpoint to lookup in the registry to use for polling messages used for testing
-| anyOrder | producer | false | boolean | Whether the expected messages should arrive in the same order or can be in any order.
-| assertPeriod | producer | 0 | long | Sets a grace period after which the mock endpoint will re-assert to ensure the preliminary assertion is still valid. This is used for example to assert that exactly a number of messages arrives. For example if link expectedMessageCount(int) was set to 5 then the assertion is satisfied when 5 or more message arrives. To ensure that exactly 5 messages arrives then you would need to wait a little period to ensure no further message arrives. This is what you can use this link setAssertPeriod(long) method for. By default this period is disabled.
-| delimiter | producer |  | String | The split delimiter to use when split is enabled. By default the delimiter is new line based. The delimiter can be a regular expression.
-| expectedCount | producer | -1 | int | Specifies the expected number of message exchanges that should be received by this endpoint. Beware: If you want to expect that 0 messages then take extra care as 0 matches when the tests starts so you need to set a assert period time to let the test run for a while to make sure there are still no messages arrived; for that use link setAssertPeriod(long). An alternative is to use NotifyBuilder and use the notifier to know when Camel is done routing some messages before you call the link assertIsSatisfied() method on the mocks. This allows you to not use a fixed assert period to speedup testing times. If you want to assert that exactly n'th message arrives to this mock endpoint then see also the link setAssertPeriod(long) method for further details.
-| reportGroup | producer |  | int | A number that is used to turn on throughput logging based on groups of the size.
-| resultMinimumWaitTime | producer | 0 | long | Sets the minimum expected amount of time (in millis) the link assertIsSatisfied() will wait on a latch until it is satisfied
-| resultWaitTime | producer | 0 | long | Sets the maximum amount of time (in millis) the link assertIsSatisfied() will wait on a latch until it is satisfied
-| retainFirst | producer | -1 | int | Specifies to only retain the first n'th number of received Exchanges. This is used when testing with big data to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation then the link getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges and have configured to only retain the first 10 Exchanges then the link getReceivedCounter() will still return 5000 but there is only the first 10 Exchanges in the link getExchanges() and link getReceivedExchanges() methods. When using this method then some of the other expectation methods is not supported for example the link expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both link setRetainFirst(int) and link setRetainLast(int) methods to limit both the first and last received.
-| retainLast | producer | -1 | int | Specifies to only retain the last n'th number of received Exchanges. This is used when testing with big data to reduce memory consumption by not storing copies of every Exchange this mock endpoint receives. Important: When using this limitation then the link getReceivedCounter() will still return the actual number of received Exchanges. For example if we have received 5000 Exchanges and have configured to only retain the last 20 Exchanges then the link getReceivedCounter() will still return 5000 but there is only the last 20 Exchanges in the link getExchanges() and link getReceivedExchanges() methods. When using this method then some of the other expectation methods is not supported for example the link expectedBodiesReceived(Object...) sets a expectation on the first number of bodies received. You can configure both link setRetainFirst(int) and link setRetainLast(int) methods to limit both the first and last received.
-| sleepForEmptyTest | producer | 0 | long | Allows a sleep to be specified to wait to check that this endpoint really is empty when link expectedMessageCount(int) is called with zero
-| split | producer | false | boolean | If enabled the the messages loaded from the test endpoint will be split using \n\r delimiters (new lines) so each line is an expected message. For example to use a file endpoint to load a file where each line is an expected message.
-| timeout | producer | 2000 | long | The timeout to use when polling for message bodies from the URI
-| copyOnExchange | producer (advanced) | true | boolean | Sets whether to make a deep copy of the incoming Exchange when received at this mock endpoint. Is by 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
-
-
-[[Test-Example]]
-Example
-^^^^^^^
-
-For example, you could write a test case as follows:
-
-[source,java]
---------------------------------------------------
-from("seda:someEndpoint").
-  to("test:file://data/expectedOutput?noop=true");
---------------------------------------------------
-
-If your test then invokes the
-http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/component/mock/MockEndpoint.html#assertIsSatisfied(org.apache.camel.CamelContext)[MockEndpoint.assertIsSatisfied(camelContext)
-method], your test case will perform the necessary assertions.
-
-To see how you can set other expectations on the test endpoint, see the
-link:mock.html[Mock] component.
-
-[[Test-SeeAlso]]
-See Also
-^^^^^^^^
-
-* link:configuring-camel.html[Configuring Camel]
-* link:component.html[Component]
-* link:endpoint.html[Endpoint]
-* link:getting-started.html[Getting Started]
-
-* link:spring-testing.html[Spring Testing]
-

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/camel-core/src/main/docs/timer-component.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/timer-component.adoc b/camel-core/src/main/docs/timer-component.adoc
new file mode 100644
index 0000000..556183b
--- /dev/null
+++ b/camel-core/src/main/docs/timer-component.adoc
@@ -0,0 +1,177 @@
+[[Timer-TimerComponent]]
+Timer Component
+~~~~~~~~~~~~~~~
+
+The *timer:* component is used to generate message exchanges when a
+timer fires You can only consume events from this endpoint.
+
+[[Timer-URIformat]]
+URI format
+^^^^^^^^^^
+
+[source,java]
+--------------------
+timer:name[?options]
+--------------------
+
+Where `name` is the name of the `Timer` object, which is created and
+shared across endpoints. So if you use the same name for all your timer
+endpoints, only one `Timer` object and thread will be used.
+
+You can append query options to the URI in the following format,
+`?option=value&option=value&...`
+
+*Note:* The IN body of the generated exchange is `null`. So
+`exchange.getIn().getBody()` returns `null`.
+
+TIP:*Advanced Scheduler*
+See also the link:quartz.html[Quartz] component that supports much more
+advanced scheduling.
+
+TIP:*Specify time in human friendly format*
+In *Camel 2.3* onwards you can specify the time in
+link:how-do-i-specify-time-period-in-a-human-friendly-syntax.html[human
+friendly syntax].
+
+
+[[Timer-Options]]
+Options
+^^^^^^^
+
+
+// component options: START
+The Timer component has no options.
+// component options: END
+
+
+
+// endpoint options: START
+The Timer component supports 13 endpoint options which are listed below:
+
+{% raw %}
+[width="100%",cols="2s,1,1m,1m,5",options="header"]
+|=======================================================================
+| Name | Group | Default | Java Type | Description
+| timerName | consumer |  | String | *Required* The name of the timer
+| 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.
+| delay | consumer | 1000 | long | The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the time option. The default value is 1000. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).
+| fixedRate | consumer | false | boolean | Events take place at approximately regular intervals separated by the specified period.
+| period | consumer | 1000 | long | If greater than 0 generate periodic events every period milliseconds. The default value is 1000. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).
+| repeatCount | consumer | 0 | long | Specifies a maximum limit of number of fires. So if you set it to 1 the timer will only fire once. If you set it to 5 it will only fire five times. A value of zero or negative means fire forever.
+| 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.
+| daemon | advanced | true | boolean | Specifies whether or not the thread associated with the timer endpoint runs as a daemon. The default value is true.
+| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
+| pattern | advanced |  | String | Allows you to specify a custom Date pattern to use for setting the time option using URI syntax.
+| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
+| time | advanced |  | Date | A java.util.Date the first event should be generated. If using the URI the pattern expected is: yyyy-MM-dd HH:mm:ss or yyyy-MM-dd'T'HH:mm:ss.
+| timer | advanced |  | Timer | To use a custom Timer
+|=======================================================================
+{% endraw %}
+// endpoint options: END
+
+
+[[Timer-ExchangeProperties]]
+Exchange Properties
+^^^^^^^^^^^^^^^^^^^
+
+When the timer is fired, it adds the following information as properties
+to the `Exchange`:
+
+[width="100%",cols="10%,10%,80%",options="header",]
+|=======================================================================
+|Name |Type |Description
+
+|`Exchange.TIMER_NAME` |`String` |The value of the `name` option.
+
+|`Exchange.TIMER_TIME` |`Date` |The value of the `time` option.
+
+|`Exchange.TIMER_PERIOD` |`long` |The value of the `period` option.
+
+|`Exchange.TIMER_FIRED_TIME` |`Date` |The time when the consumer fired.
+
+|`Exchange.TIMER_COUNTER` |`Long` |*Camel 2.8:* The current fire counter. Starts from 1.
+|=======================================================================
+
+[[Timer-Sample]]
+Sample
+^^^^^^
+
+To set up a route that generates an event every 60 seconds:
+
+[source,java]
+-------------------------------------------------------------------------------------------
+   from("timer://foo?fixedRate=true&period=60000").to("bean:myBean?method=someMethodName");
+-------------------------------------------------------------------------------------------
+
+TIP:Instead of 60000 you can use period=60s which is more friendly to read.
+
+The above route will generate an event and then invoke the
+`someMethodName` method on the bean called `myBean` in the
+link:registry.html[Registry] such as JNDI or link:spring.html[Spring].
+
+And the route in Spring DSL:
+
+[source,xml]
+-------------------------------------------------------------
+  <route>
+    <from uri="timer://foo?fixedRate=true&amp;period=60000"/>
+    <to uri="bean:myBean?method=someMethodName"/>
+  </route>
+-------------------------------------------------------------
+
+[[Timer-Firingassoonaspossible]]
+Firing as soon as possible
+++++++++++++++++++++++++++
+
+[[Timer-AvailableasofCamel2.17]]
+Available as of Camel 2.17
+++++++++++++++++++++++++++
+
+You may want to fire messages in a Camel route as soon as possible you
+can use a negative delay:
+
+[source,xml]
+-------------------------------------------------
+  <route>
+    <from uri="timer://foo?delay=-1"/>
+    <to uri="bean:myBean?method=someMethodName"/>
+  </route>
+-------------------------------------------------
+
+In this way the timer will fire messages immediately.
+
+You can also specify a repeatCount parameter in conjunction with a
+negative delay to stop firing messages after a fixed number has been
+reached.
+
+If you don't specify a repeatCount then the timer will continue firing
+messages until the route will be stopped. 
+
+[[Timer-Firingonlyonce]]
+Firing only once
+++++++++++++++++
+
+*Available as of Camel 2.8*
+
+You may want to fire a message in a Camel route only once, such as when
+starting the route. To do that you use the repeatCount option as shown:
+
+[source,xml]
+-------------------------------------------------
+  <route>
+    <from uri="timer://foo?repeatCount=1"/>
+    <to uri="bean:myBean?method=someMethodName"/>
+  </route>
+-------------------------------------------------
+
+[[Timer-SeeAlso]]
+See Also
+^^^^^^^^
+
+* link:configuring-camel.html[Configuring Camel]
+* link:component.html[Component]
+* link:endpoint.html[Endpoint]
+* link:getting-started.html[Getting Started]
+
+* link:quartz.html[Quartz]
+

http://git-wip-us.apache.org/repos/asf/camel/blob/9c0b7baf/camel-core/src/main/docs/timer.adoc
----------------------------------------------------------------------
diff --git a/camel-core/src/main/docs/timer.adoc b/camel-core/src/main/docs/timer.adoc
deleted file mode 100644
index 556183b..0000000
--- a/camel-core/src/main/docs/timer.adoc
+++ /dev/null
@@ -1,177 +0,0 @@
-[[Timer-TimerComponent]]
-Timer Component
-~~~~~~~~~~~~~~~
-
-The *timer:* component is used to generate message exchanges when a
-timer fires You can only consume events from this endpoint.
-
-[[Timer-URIformat]]
-URI format
-^^^^^^^^^^
-
-[source,java]
---------------------
-timer:name[?options]
---------------------
-
-Where `name` is the name of the `Timer` object, which is created and
-shared across endpoints. So if you use the same name for all your timer
-endpoints, only one `Timer` object and thread will be used.
-
-You can append query options to the URI in the following format,
-`?option=value&option=value&...`
-
-*Note:* The IN body of the generated exchange is `null`. So
-`exchange.getIn().getBody()` returns `null`.
-
-TIP:*Advanced Scheduler*
-See also the link:quartz.html[Quartz] component that supports much more
-advanced scheduling.
-
-TIP:*Specify time in human friendly format*
-In *Camel 2.3* onwards you can specify the time in
-link:how-do-i-specify-time-period-in-a-human-friendly-syntax.html[human
-friendly syntax].
-
-
-[[Timer-Options]]
-Options
-^^^^^^^
-
-
-// component options: START
-The Timer component has no options.
-// component options: END
-
-
-
-// endpoint options: START
-The Timer component supports 13 endpoint options which are listed below:
-
-{% raw %}
-[width="100%",cols="2s,1,1m,1m,5",options="header"]
-|=======================================================================
-| Name | Group | Default | Java Type | Description
-| timerName | consumer |  | String | *Required* The name of the timer
-| 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.
-| delay | consumer | 1000 | long | The number of milliseconds to wait before the first event is generated. Should not be used in conjunction with the time option. The default value is 1000. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).
-| fixedRate | consumer | false | boolean | Events take place at approximately regular intervals separated by the specified period.
-| period | consumer | 1000 | long | If greater than 0 generate periodic events every period milliseconds. The default value is 1000. You can also specify time values using units such as 60s (60 seconds) 5m30s (5 minutes and 30 seconds) and 1h (1 hour).
-| repeatCount | consumer | 0 | long | Specifies a maximum limit of number of fires. So if you set it to 1 the timer will only fire once. If you set it to 5 it will only fire five times. A value of zero or negative means fire forever.
-| 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.
-| daemon | advanced | true | boolean | Specifies whether or not the thread associated with the timer endpoint runs as a daemon. The default value is true.
-| exchangePattern | advanced | InOnly | ExchangePattern | Sets the default exchange pattern when creating an exchange.
-| pattern | advanced |  | String | Allows you to specify a custom Date pattern to use for setting the time option using URI syntax.
-| synchronous | advanced | false | boolean | Sets whether synchronous processing should be strictly used or Camel is allowed to use asynchronous processing (if supported).
-| time | advanced |  | Date | A java.util.Date the first event should be generated. If using the URI the pattern expected is: yyyy-MM-dd HH:mm:ss or yyyy-MM-dd'T'HH:mm:ss.
-| timer | advanced |  | Timer | To use a custom Timer
-|=======================================================================
-{% endraw %}
-// endpoint options: END
-
-
-[[Timer-ExchangeProperties]]
-Exchange Properties
-^^^^^^^^^^^^^^^^^^^
-
-When the timer is fired, it adds the following information as properties
-to the `Exchange`:
-
-[width="100%",cols="10%,10%,80%",options="header",]
-|=======================================================================
-|Name |Type |Description
-
-|`Exchange.TIMER_NAME` |`String` |The value of the `name` option.
-
-|`Exchange.TIMER_TIME` |`Date` |The value of the `time` option.
-
-|`Exchange.TIMER_PERIOD` |`long` |The value of the `period` option.
-
-|`Exchange.TIMER_FIRED_TIME` |`Date` |The time when the consumer fired.
-
-|`Exchange.TIMER_COUNTER` |`Long` |*Camel 2.8:* The current fire counter. Starts from 1.
-|=======================================================================
-
-[[Timer-Sample]]
-Sample
-^^^^^^
-
-To set up a route that generates an event every 60 seconds:
-
-[source,java]
--------------------------------------------------------------------------------------------
-   from("timer://foo?fixedRate=true&period=60000").to("bean:myBean?method=someMethodName");
--------------------------------------------------------------------------------------------
-
-TIP:Instead of 60000 you can use period=60s which is more friendly to read.
-
-The above route will generate an event and then invoke the
-`someMethodName` method on the bean called `myBean` in the
-link:registry.html[Registry] such as JNDI or link:spring.html[Spring].
-
-And the route in Spring DSL:
-
-[source,xml]
--------------------------------------------------------------
-  <route>
-    <from uri="timer://foo?fixedRate=true&amp;period=60000"/>
-    <to uri="bean:myBean?method=someMethodName"/>
-  </route>
--------------------------------------------------------------
-
-[[Timer-Firingassoonaspossible]]
-Firing as soon as possible
-++++++++++++++++++++++++++
-
-[[Timer-AvailableasofCamel2.17]]
-Available as of Camel 2.17
-++++++++++++++++++++++++++
-
-You may want to fire messages in a Camel route as soon as possible you
-can use a negative delay:
-
-[source,xml]
--------------------------------------------------
-  <route>
-    <from uri="timer://foo?delay=-1"/>
-    <to uri="bean:myBean?method=someMethodName"/>
-  </route>
--------------------------------------------------
-
-In this way the timer will fire messages immediately.
-
-You can also specify a repeatCount parameter in conjunction with a
-negative delay to stop firing messages after a fixed number has been
-reached.
-
-If you don't specify a repeatCount then the timer will continue firing
-messages until the route will be stopped. 
-
-[[Timer-Firingonlyonce]]
-Firing only once
-++++++++++++++++
-
-*Available as of Camel 2.8*
-
-You may want to fire a message in a Camel route only once, such as when
-starting the route. To do that you use the repeatCount option as shown:
-
-[source,xml]
--------------------------------------------------
-  <route>
-    <from uri="timer://foo?repeatCount=1"/>
-    <to uri="bean:myBean?method=someMethodName"/>
-  </route>
--------------------------------------------------
-
-[[Timer-SeeAlso]]
-See Also
-^^^^^^^^
-
-* link:configuring-camel.html[Configuring Camel]
-* link:component.html[Component]
-* link:endpoint.html[Endpoint]
-* link:getting-started.html[Getting Started]
-
-* link:quartz.html[Quartz]
-


Mime
View raw message