This is an automated email from the ASF dual-hosted git repository.
orpiske pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 06908b5a4e0 CAMEL-21040: ensure more consistency in the document
sections
06908b5a4e0 is described below
commit 06908b5a4e07f125a7f58401316581ab3785f1a6
Author: Otavio Rodolfo Piske <[email protected]>
AuthorDate: Fri Aug 9 13:31:24 2024 +0200
CAMEL-21040: ensure more consistency in the document sections
- Reorganized examples
---
.../camel-stax/src/main/docs/stax-component.adoc | 10 ++-
.../src/main/docs/stitch-component.adoc | 27 ++++----
.../camel-stomp/src/main/docs/stomp-component.adoc | 14 ++--
.../src/main/docs/stream-component.adoc | 6 +-
.../src/main/docs/string-template-component.adoc | 16 ++---
.../camel-stub/src/main/docs/stub-component.adoc | 19 ++---
.../src/main/docs/swiftMt-dataformat.adoc | 6 +-
.../src/main/docs/telegram-component.adoc | 26 ++++---
.../src/main/docs/test-junit5.adoc | 4 +-
.../src/main/docs/test-main-junit5.adoc | 2 +-
.../src/main/docs/test-spring-junit5.adoc | 22 +++---
.../src/main/docs/threadpoolfactory-vertx.adoc | 2 +-
.../src/main/docs/thymeleaf-component.adoc | 14 ++--
.../camel-tika/src/main/docs/tika-component.adoc | 5 +-
.../camel-timer/src/main/docs/timer-component.adoc | 8 ++-
.../camel-tracing/src/main/docs/tracing.adoc | 2 +-
.../src/main/docs/twilio-component.adoc | 5 +-
.../src/main/docs/undertow-spring-security.adoc | 4 +-
.../src/main/docs/undertow-component.adoc | 81 +++++++++++-----------
.../src/main/docs/univocityFixed-dataformat.adoc | 2 +-
.../src/main/docs/velocity-component.adoc | 14 ++--
.../src/main/docs/vertx-http-component.adoc | 21 +++---
.../src/main/docs/vertx-websocket-component.adoc | 8 +--
.../camel-wasm/src/main/docs/wasm-component.adoc | 9 +--
24 files changed, 170 insertions(+), 157 deletions(-)
diff --git a/components/camel-stax/src/main/docs/stax-component.adoc
b/components/camel-stax/src/main/docs/stax-component.adoc
index 45b5137b9ec..29929b96d1c 100644
--- a/components/camel-stax/src/main/docs/stax-component.adoc
+++ b/components/camel-stax/src/main/docs/stax-component.adoc
@@ -66,9 +66,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
+== Usage
-
-== Usage of a content handler as StAX parser
+=== Usage of a content handler as StAX parser
The message body after the handling is the handler itself.
@@ -88,7 +88,7 @@ from("file:target/in")
});
--------------------------------------------------------------------------------------------------------
-== Iterate over a collection using JAXB and StAX
+=== Iterate over a collection using JAXB and StAX
First, we suppose you have JAXB objects.
@@ -192,9 +192,7 @@ from("file:target/in")
.to("mock:records");
-------------------------------------------------
-=== The previous example with XML DSL
-
-The example above could be implemented as follows in Spring XML
+Alternatively, the example above could be implemented as follows in Spring XML
[source,xml]
----
diff --git a/components/camel-stitch/src/main/docs/stitch-component.adoc
b/components/camel-stitch/src/main/docs/stitch-component.adoc
index b5dc738609d..c0ce9883e2e 100644
--- a/components/camel-stitch/src/main/docs/stitch-component.adoc
+++ b/components/camel-stitch/src/main/docs/stitch-component.adoc
@@ -19,12 +19,7 @@ applications and databases. It integrates various data
sources into a central da
for many enterprise software data sources, and can receive data via WebHooks
and an API (Stitch Import API) which
Camel Stitch Component uses to produce the data to Stitch ETL.
-For more info, feel free to visit their website: https://www.stitchdata.com/
-
-Prerequisites
-
-You must have a valid Stitch account, you will need to enable Stitch Import
API and generate a token for the
-integration, for more info, please find more info
https://www.stitchdata.com/docs/developers/import-api/guides/quick-start[here].
+For more info, feel free to visit their https://www.stitchdata.com/[website]
Maven users will need to add the following dependency to their `pom.xml`
for this component:
@@ -62,16 +57,21 @@ include::partial$component-endpoint-options.adoc[]
include::partial$component-endpoint-headers.adoc[]
// component headers: END
-== Async Producer
+== Usage
+
+=== Prerequisites
+
+You must have a valid Stitch account, you will need to enable Stitch Import
API and generate a token for the
+integration, for more info, please find more info
https://www.stitchdata.com/docs/developers/import-api/guides/quick-start[here].
+
+=== Async Producer
This component implements the async Consumer and producer.
This allows camel route to consume and produce events asynchronously without
blocking any threads.
-== Usage
-
-For example, to produce data to Stitch from a custom processor:
+.Example showing how to produce data to Stitch from a custom processor:
[source,java]
--------------------------------------------------------------------------------
from("direct:sendStitch")
@@ -93,6 +93,7 @@ from("direct:sendStitch")
--------------------------------------------------------------------------------
=== Message body type
+
Currently, the component supports the following types for the body message on
the producer side when producing a message to Stitch component:
* `org.apache.camel.component.stitch.client.models.StitchRequestBody`: This
represents this Stitch
https://www.stitchdata.com/docs/developers/import-api/api#batch-data--arguments[JSON
Message]. However,
@@ -110,7 +111,7 @@ can be type of `StitchMessage`, `StitchRequestBody` or
`Map` but this Map here i
=== Examples
-Here is list of examples of data that can be proceeded to Stitch:
+Here is list of examples showing data that can be proceeded to Stitch:
==== Input body type
`org.apache.camel.component.stitch.client.models.StitchRequestBody`:
[source,java]
@@ -230,9 +231,9 @@ from("direct:sendStitch")
.to("stitch:table_1?token=RAW({{token}})");
--------------------------------------------------------------------------------
-=== Development Notes (Important)
+== Development Notes (Important)
-When developing on this component, you will need to obtain your Stitch token
to run the integration tests.
+When developing on this component, you will need to obtain a Stitch token to
run the integration tests.
In addition to the mocked unit tests,
you *will need to run the integration tests with every change you make*
To run the integration tests, in this component directory, run the following
maven command:
diff --git a/components/camel-stomp/src/main/docs/stomp-component.adoc
b/components/camel-stomp/src/main/docs/stomp-component.adoc
index 7d6fca0b1f9..966eb37d998 100644
--- a/components/camel-stomp/src/main/docs/stomp-component.adoc
+++ b/components/camel-stomp/src/main/docs/stomp-component.adoc
@@ -17,7 +17,7 @@
The Stomp component is used for communicating with
http://stomp.github.io/[Stomp] compliant message brokers, like
http://activemq.apache.org[Apache ActiveMQ] or
-http://activemq.apache.org/apollo/[ActiveMQ Apollo]
+https://activemq.apache.org/components/artemis/[ActiveMQ Artemis]
NOTE: Since STOMP specification is not actively maintained,
please note
https://github.com/fusesource/stompjms/tree/master/stompjms-client[STOMP JMS
client]
@@ -89,20 +89,20 @@ the DSL via their URIs.
From an Endpoint you can use the following methods
-*
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Endpoint.html#createProducer--[createProducer()]
+*
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Endpoint.html#createProducer--[`createProducer()`]
will create a
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Producer.html[Producer]
for sending message exchanges to the endpoint
-*
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Endpoint.html#createConsumer-org.apache.camel.Processor-[createConsumer()]
+*
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Endpoint.html#createConsumer-org.apache.camel.Processor-[`createConsumer()`]
implements the Event Driven Consumer
pattern for consuming message exchanges from the endpoint via a
-https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Processor.html[Processor]
+https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Processor.html[`Processor`]
when creating a
-https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Consumer.html[Consumer]
-*
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Endpoint.html#createPollingConsumer--[createPollingConsumer()]
+https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Consumer.html[`Consumer`]
+*
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Endpoint.html#createPollingConsumer--[`createPollingConsumer()`]
implements the Polling Consumer pattern for
consuming message exchanges from the endpoint via a
-https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/PollingConsumer.html[PollingConsumer]
+https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/PollingConsumer.html[`PollingConsumer`]
diff --git a/components/camel-stream/src/main/docs/stream-component.adoc
b/components/camel-stream/src/main/docs/stream-component.adoc
index 71134b67937..4dc27214b51 100644
--- a/components/camel-stream/src/main/docs/stream-component.adoc
+++ b/components/camel-stream/src/main/docs/stream-component.adoc
@@ -63,7 +63,9 @@ include::partial$component-endpoint-options.adoc[]
include::partial$component-endpoint-headers.adoc[]
// component headers: END
-== Message content
+== Usage
+
+=== Message content
The Stream component supports either `String` or `byte[]` for writing
to streams. Just add either `String` or `byte[]` content to the
@@ -116,7 +118,7 @@
from("stream:file?fileName=/server/logs/server.log&scanStream=true&scanStreamDel
.to("bean:logService?method=parseLogLine");
----
-== Reading HTTP server side streaming
+=== Reading HTTP server side streaming
The camel-stream component has basic support for connecting to a remote HTTP
server and read streaming data
(chunk of data separated by new-line).
diff --git
a/components/camel-stringtemplate/src/main/docs/string-template-component.adoc
b/components/camel-stringtemplate/src/main/docs/string-template-component.adoc
index 2d5a1eba416..e405efdab49 100644
---
a/components/camel-stringtemplate/src/main/docs/string-template-component.adoc
+++
b/components/camel-stringtemplate/src/main/docs/string-template-component.adoc
@@ -59,13 +59,15 @@ include::partial$component-endpoint-options.adoc[]
include::partial$component-endpoint-headers.adoc[]
// component headers: END
-== Headers
+== Usage
+
+=== Headers
Camel will store a reference to the resource in the message header with
key, `org.apache.camel.stringtemplate.resource`. The Resource is an
`org.springframework.core.io.Resource` object.
-== String Template Context
+=== String Template Context
Camel will provide exchange information in the String Template context (just a
`Map`). The `Exchange` is transferred as:
@@ -91,21 +93,21 @@ Camel will provide exchange information in the String
Template context (just a
|`response` |The Out message (only for InOut message exchange pattern).
|=======================================================================
-== Hot reloading
+=== Hot reloading
The string template resource is by default hot-reloadable for both file
and classpath resources (expanded jar). If you set `contentCache=true`,
Camel loads the resource only once and hot-reloading is not possible.
This scenario can be used in production when the resource never changes.
-== Dynamic templates
+=== Dynamic templates
Camel provides two headers by which you can define a different resource
location for a template or the template content itself. If any of these
headers is set, then Camel uses this over the endpoint configured
resource. This allows you to provide a dynamic template at runtime.
-== StringTemplate Attributes
+=== StringTemplate Attributes
You can define the custom context map by setting the
message header "*CamelStringTemplateVariableMap*" just like the below
@@ -133,7 +135,7 @@ from("activemq:My.Queue").
to("string-template:com/acme/MyResponse.tm");
-----------------------------------------------
-== The Email Example
+=== The Email Example
In this sample, we want to use a string template to send an order
confirmation email. The email template is laid out in `StringTemplate`
@@ -148,6 +150,4 @@ Regards Camel Riders Bookstore
<body>
--------------------------------------------
-And the java code is as follows:
-
include::spring-boot:partial$starter.adoc[]
diff --git a/components/camel-stub/src/main/docs/stub-component.adoc
b/components/camel-stub/src/main/docs/stub-component.adoc
index 08e1603f903..e472566d45e 100644
--- a/components/camel-stub/src/main/docs/stub-component.adoc
+++ b/components/camel-stub/src/main/docs/stub-component.adoc
@@ -22,15 +22,6 @@ xref:mail-component.adoc[SMTP] or
xref:http-component.adoc[Http] endpoint.
Add *stub:*
in front of any endpoint URI to stub out the endpoint.
-Internally, the Stub component creates xref:seda-component.adoc[Seda]
endpoints.
-The main difference between xref:stub-component.adoc[Stub] and
xref:seda-component.adoc[Seda] is
-that xref:seda-component.adoc[Seda] will validate the URI and parameters you
give it,
-so putting seda: 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.
-
== URI format
----
@@ -54,6 +45,16 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
+== Usage
+
+Internally, the Stub component creates xref:seda-component.adoc[Seda]
endpoints.
+The main difference between xref:stub-component.adoc[Stub] and
xref:seda-component.adoc[Seda] is
+that xref:seda-component.adoc[Seda] will validate the URI and parameters you
give it,
+so putting seda: 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.
== Examples
diff --git a/components/camel-swift/src/main/docs/swiftMt-dataformat.adoc
b/components/camel-swift/src/main/docs/swiftMt-dataformat.adoc
index 71fa4d3d32f..57fdf0ad961 100644
--- a/components/camel-swift/src/main/docs/swiftMt-dataformat.adoc
+++ b/components/camel-swift/src/main/docs/swiftMt-dataformat.adoc
@@ -86,6 +86,7 @@ The unmarshaller converts the input data into the concrete
class of type `com.pr
In this example, we unmarshal the content of a file to get SWIFT MT
objects before processing them with the `newOrder` processor.
+.SwiftMt example in Java
[source,java]
----
from("file://data.bin")
@@ -93,8 +94,7 @@ from("file://data.bin")
.process("newOrder");
----
-In Spring DSL:
-
+.SwiftMt example in In Spring DSL
[source,xml]
----
<from uri="file://data.bin">
@@ -109,7 +109,7 @@ In Spring DSL:
To use SWIFT MT in your Camel routes, you need to add a dependency on
*camel-swift* which implements this data format.
-If you use Maven, you can add the following to your pom.xml:
+If you use Maven, you can add the following to your `pom.xml`:
[source,xml]
----
diff --git a/components/camel-telegram/src/main/docs/telegram-component.adoc
b/components/camel-telegram/src/main/docs/telegram-component.adoc
index 0e67f43b1cd..1190c208441 100644
--- a/components/camel-telegram/src/main/docs/telegram-component.adoc
+++ b/components/camel-telegram/src/main/docs/telegram-component.adoc
@@ -74,20 +74,18 @@ include::partial$component-endpoint-headers.adoc[]
The Telegram component supports both consumer and producer endpoints.
It can also be used in *reactive chatbot mode* (to consume, then produce
messages).
-== Producer Example
+=== Producer
The following is a basic example of how to send a message to a Telegram chat
through the
Telegram Bot API.
-in Java DSL
-
+.Telegram producer example in Java DSL
[source,java]
---------------------------------------------------------
from("direct:start").to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
---------------------------------------------------------
-or in Spring XML
-
+.Telegram producer example in Spring XML
[source,xml]
---------------------------------------------
<route>
@@ -127,19 +125,19 @@ The following message bodies are allowed for a producer
endpoint (messages of ty
|===================================================
-== Consumer Example
+=== Consumer
The following is a basic example of how to receive all messages that telegram
users are sending to the configured Bot.
In Java DSL
+.Telegram consumer example in Java DSL
[source,java]
---------------------------------------------------------
from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
.bean(ProcessorBean.class)
---------------------------------------------------------
-or in Spring XML
-
+.Telegram producer example in Spring XML
[source,xml]
---------------------------------------------
<route>
@@ -180,13 +178,14 @@ Supported types for incoming messages are
-== Reactive Chat-Bot Example
+=== Reactive Chat-Bot Example
The reactive chatbot mode is a simple way of using the Camel component to
build a simple
chatbot that replies directly to chat messages received from the Telegram
users.
The following is a basic configuration of the chatbot in Java DSL
+.Telegram reactive example in Java
[source,java]
---------------------------------------------------------
from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere")
@@ -194,8 +193,7 @@
from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHer
.to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere");
---------------------------------------------------------
-or in Spring XML
-
+.Telegram reactive example in Spring XML
[source,xml]
---------------------------------------------
<route>
@@ -229,7 +227,7 @@ public class ChatBotLogic {
Every non-null string returned by the `chatBotProcess` method is automatically
routed to the
chat that originated the request (as the `CamelTelegramChatId` header is used
to route the message).
-== Getting the Chat ID
+=== Getting the Chat ID
If you want to push messages to a specific Telegram chat when an event occurs,
you need to
retrieve the corresponding chat ID. The chat ID is not currently shown in the
telegram client,
@@ -257,7 +255,7 @@
to("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHere&
Note that the corresponding URI parameter is simply `chatId`.
-== Customizing keyboard
+=== Customizing keyboard
You can customize the user keyboard instead of asking him to write an option.
`OutgoingTextMessage` has the property `ReplyMarkup` which can be used for
such a thing.
@@ -316,7 +314,7 @@
from("telegram:bots?authorizationToken=123456789:insertYourAuthorizationTokenHer
---------------------------------------------------------
-== Webhook Mode
+=== Webhook Mode
The Telegram component supports usage in the *webhook mode* using the
*camel-webhook* component.
diff --git
a/components/camel-test/camel-test-junit5/src/main/docs/test-junit5.adoc
b/components/camel-test/camel-test-junit5/src/main/docs/test-junit5.adoc
index e0477ec60e0..e0b8232501f 100644
--- a/components/camel-test/camel-test-junit5/src/main/docs/test-junit5.adoc
+++ b/components/camel-test/camel-test-junit5/src/main/docs/test-junit5.adoc
@@ -19,7 +19,7 @@ and implement your Camel unit test.
As shown below is a basic junit test which uses `camel-test-junit5`. The
`createRouteBuilder` method is used
for build the routes to be tested. Then the methods with `@Test` annotations
are JUnit test methods which
will be executed. The base class `CamelTestSupport` has a number of helper
methods to configure testing,
-see more at the javadoc of this class.
+see more at the Javadoc of this class.
[source,java]
----
@@ -93,4 +93,4 @@ Once Camel related steps have been performed, there are still
typical JUnit 5 mi
* `org.junit.AfterClass` should be changed in favor of `import
org.junit.jupiter.api.AfterAll`
* Built-in `assertThat` from third-party assertion libraries should be used.
For instance, use `org.hamcrest.MatcherAssert.assertThat` from `java-hamcrest`
-Depending on the context, more involved tips might be needed, please check the
https://junit.org/junit5/docs/current/user-guide/[JUnit 5 User Guide].
+Please check the https://junit.org/junit5/docs/current/user-guide/[JUnit 5
User Guide] for additional insights about writing tests using JUnit 5.
diff --git
a/components/camel-test/camel-test-main-junit5/src/main/docs/test-main-junit5.adoc
b/components/camel-test/camel-test-main-junit5/src/main/docs/test-main-junit5.adoc
index fe164ba26c6..a7a2cfb00c8 100644
---
a/components/camel-test/camel-test-main-junit5/src/main/docs/test-main-junit5.adoc
+++
b/components/camel-test/camel-test-main-junit5/src/main/docs/test-main-junit5.adoc
@@ -95,7 +95,7 @@ Several methods in the test class and/or its parent classes
can be annotated.
=== Examples ===
-In the next examples, the test class `SomeTest` adds a configuration class and
specifies the xml routes to include.
+In the next examples, the test class `SomeTest` adds a configuration class and
specifies the XML routes to include.
[tabs]
====
diff --git
a/components/camel-test/camel-test-spring-junit5/src/main/docs/test-spring-junit5.adoc
b/components/camel-test/camel-test-spring-junit5/src/main/docs/test-spring-junit5.adoc
index 918bfaac667..694d7b7a64a 100644
---
a/components/camel-test/camel-test-spring-junit5/src/main/docs/test-spring-junit5.adoc
+++
b/components/camel-test/camel-test-spring-junit5/src/main/docs/test-spring-junit5.adoc
@@ -200,17 +200,17 @@ The following annotations can be used with
`camel-spring-junit5` unit testing.
[width="100%",cols="1m,4",options="header",]
|=======================================================================
|Annotation |Description
-| @CamelSpringBootTest | Used for testing Camel with Spring Boot
-| @CamelSpringTest | Used for testing Camel with classic Spring XML (not
Spring Boot)
-| @DisableJmx | Used for disabling JMX
-| @EnableRouteCoverage | Enables dumping route coverage statistics. The route
coverage status is written as xml files in the `target/camel-route-coverage`
directory after the test has finished. See more information at
xref:manual::camel-report-maven-plugin.adoc[Camel Maven Report Plugin].
-| @ExcludeRoutes | Indicates if certain route builder classes should be
excluded from package scan discovery
-| @MockEndpoints | Auto-mocking of endpoints whose URIs match the provided
filter. For more information, see xref:manual::advice-with.adoc[Advice With].
-| @MockEndpointsAndSkip | Auto-mocking of endpoints whose URIs match the
provided filter with the added provision that the endpoints are also skipped.
For more information, see xref:manual::advice-with.adoc[Advice With].
-| @ProvidesBreakpoint | Indicates that the annotated method returns a
`Breakpoint` for use in the test. Useful for intercepting traffic to all
endpoints or simply for setting a break point in an IDE for debugging. The
method must be `public static`, take no arguments, and return `Breakpoint`.
-| @ShutdownTimeout | Timeout to use for
xref:manual::graceful-shutdown.adoc[shutdown]. The default is 10 seconds.
-| @UseAdviceWith | To enable testing with xref:manual::advice-with.adoc[Advice
With].
-| @UseOverridePropertiesWithPropertiesComponent | To use custom `Properties`
with the xref:ROOT:properties-component.adoc[Properties] component. The
annotated method must be `public` and return `Properties`.
+| `@CamelSpringBootTest` | Used for testing Camel with Spring Boot
+| `@CamelSpringTest` | Used for testing Camel with classic Spring XML (not
Spring Boot)
+| `@DisableJmx` | Used for disabling JMX
+| `@EnableRouteCoverage` | Enables dumping route coverage statistics. The
route coverage status is written as xml files in the
`target/camel-route-coverage` directory after the test has finished. See more
information at xref:manual::camel-report-maven-plugin.adoc[Camel Maven Report
Plugin].
+| `@ExcludeRoutes` | Indicates if certain route builder classes should be
excluded from package scan discovery
+| `@MockEndpoints` | Auto-mocking of endpoints whose URIs match the provided
filter. For more information, see xref:manual::advice-with.adoc[Advice With].
+| `@MockEndpointsAndSkip` | Auto-mocking of endpoints whose URIs match the
provided filter with the added provision that the endpoints are also skipped.
For more information, see xref:manual::advice-with.adoc[Advice With].
+| `@ProvidesBreakpoint` | Indicates that the annotated method returns a
`Breakpoint` for use in the test. Useful for intercepting traffic to all
endpoints or simply for setting a break point in an IDE for debugging. The
method must be `public static`, take no arguments, and return `Breakpoint`.
+| `@ShutdownTimeout` | Timeout to use for
xref:manual::graceful-shutdown.adoc[shutdown]. The default is 10 seconds.
+| `@UseAdviceWith` | To enable testing with
xref:manual::advice-with.adoc[Advice With].
+| `@UseOverridePropertiesWithPropertiesComponent` | To use custom `Properties`
with the xref:ROOT:properties-component.adoc[Properties] component. The
annotated method must be `public` and return `Properties`.
|=======================================================================
diff --git
a/components/camel-threadpoolfactory-vertx/src/main/docs/threadpoolfactory-vertx.adoc
b/components/camel-threadpoolfactory-vertx/src/main/docs/threadpoolfactory-vertx.adoc
index 7db87421841..4c455dcc18e 100644
---
a/components/camel-threadpoolfactory-vertx/src/main/docs/threadpoolfactory-vertx.adoc
+++
b/components/camel-threadpoolfactory-vertx/src/main/docs/threadpoolfactory-vertx.adoc
@@ -9,7 +9,7 @@
*Since Camel {since}*
-The camel-threadpoolfactory-vertx is a VertX based implementation of the
`ThreadPoolFactory` SPI.
+The Camel ThreadPoolFactory Vert.x component is a VertX based implementation
of the `ThreadPoolFactory` SPI.
By default, Camel will use its own thread pool for EIPs that can use parallel
processing (such as splitter, aggregator).
You can plug in different engines via an SPI interface. This is a VertX based
plugin that uses the VertX worker thread pool
diff --git a/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc
b/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc
index 8971d388664..e63030033de 100644
--- a/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc
+++ b/components/camel-thymeleaf/src/main/docs/thymeleaf-component.adoc
@@ -74,7 +74,9 @@ $in.setHeader("fruit", "Apple")
The `fruit` header is now accessible from the `message.out.headers`.
-== Thymeleaf Context
+== Usage
+
+=== Thymeleaf Context
Camel will provide exchange information in the Thymeleaf context (just a
`Map`).
@@ -112,7 +114,7 @@ EngineContext engineContext = new
EngineContext(variableMap);
exchange.getIn().setHeader("CamelThymeleafContext", engineContext);
-----------------------------------------------------------------------
-== Hot reloading
+=== Hot reloading
The Thymeleaf template resource is, by default, hot reloadable for both
file and classpath resources (expanded jar). If you set
@@ -120,7 +122,7 @@ file and classpath resources (expanded jar). If you set
hot reloading is not possible. This scenario can be used in production
when the resource never changes.
-== Dynamic templates
+=== Dynamic templates
Camel provides two headers by which you can define a different resource
location for a template or the template content itself. If any of these
@@ -131,10 +133,10 @@ resource. This allows you to provide a dynamic template
at runtime.
|=======================================================================
|Header |Type |Description
-|CamelThymeleafResourceUri |String |A URI for the template resource to use
instead of the
+|`CamelThymeleafResourceUri` |`String` |A URI for the template resource to use
instead of the
endpoint configured.
-|CamelThymeleafTemplate |String |The template to use instead of the endpoint
configured.
+|`CamelThymeleafTemplate` |`String` |The template to use instead of the
endpoint configured.
|=======================================================================
== Examples
@@ -199,7 +201,7 @@ from("direct:in")
.to("thymeleaf:dummy?allowTemplateFromHeader=true"");
---------------------------------------------------------------------------------------------------------------
-== The Email Example
+=== The Email Example
In this sample, we want to use Thymeleaf templating for an order
confirmation email. The email template is laid out in Thymeleaf as:
diff --git a/components/camel-tika/src/main/docs/tika-component.adoc
b/components/camel-tika/src/main/docs/tika-component.adoc
index 26f4256ef62..a46c4b39366 100644
--- a/components/camel-tika/src/main/docs/tika-component.adoc
+++ b/components/camel-tika/src/main/docs/tika-component.adoc
@@ -49,8 +49,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
+== Usage
-== To Detect a file's MIME Type
+=== To Detect a file's MIME Type
The file should be placed in the Body.
@@ -60,7 +61,7 @@ from("direct:start")
.to("tika:detect");
----
-== To Parse a File
+=== To Parse a File
The file should be placed in the Body.
diff --git a/components/camel-timer/src/main/docs/timer-component.adoc
b/components/camel-timer/src/main/docs/timer-component.adoc
index c4ba453dc44..05c5aa541b9 100644
--- a/components/camel-timer/src/main/docs/timer-component.adoc
+++ b/components/camel-timer/src/main/docs/timer-component.adoc
@@ -55,7 +55,9 @@ include::partial$component-endpoint-options.adoc[]
include::partial$component-endpoint-headers.adoc[]
// component headers: END
-== Exchange Properties
+== Usage
+
+=== Exchange Properties
When the timer is fired, it adds the following information as properties
to the `Exchange`:
@@ -98,7 +100,7 @@ And the route in Spring DSL:
</route>
-----
-== Firing as soon as possible
+=== Firing as soon as possible
You may want to fire messages in a Camel route as soon as possible, you
can use a negative delay:
@@ -120,7 +122,7 @@ reached.
If you don't specify a `repeatCount` then the timer will continue firing
messages until the route will be stopped.
-== Firing only once
+=== Firing only once
You may want to fire a message in a Camel route only once, such as when
starting the route.
diff --git a/components/camel-tracing/src/main/docs/tracing.adoc
b/components/camel-tracing/src/main/docs/tracing.adoc
index 2ce65ec572e..0e01a56fd98 100644
--- a/components/camel-tracing/src/main/docs/tracing.adoc
+++ b/components/camel-tracing/src/main/docs/tracing.adoc
@@ -11,7 +11,7 @@
This module is a common interface and API for distributed tracing.
-This module is not intended to be used by end users. Instead, should use one
of:
+This module is not intended to be used by end users. Instead, you should use
one of:
* xref:opentelemetry.adoc[`camel-opentelemetry`]
* xref:observation.adoc[`camel-observation`]
diff --git a/components/camel-twilio/src/main/docs/twilio-component.adoc
b/components/camel-twilio/src/main/docs/twilio-component.adoc
index d713f37e342..c5ab21a251f 100644
--- a/components/camel-twilio/src/main/docs/twilio-component.adoc
+++ b/components/camel-twilio/src/main/docs/twilio-component.adoc
@@ -17,7 +17,7 @@
The Twilio component provides access to Version 2010-04-01 of Twilio REST APIs
accessible
using https://github.com/twilio/twilio-java[Twilio Java SDK].
-Maven users will need to add the following dependency to their pom.xml
+Maven users will need to add the following dependency to their `pom.xml`
for this component:
[source,xml]
@@ -43,8 +43,9 @@ include::partial$component-endpoint-options.adoc[]
// endpoint options: END
+== Usage
-== Producer Endpoints:
+=== Producer Endpoints:
Producer endpoints can use endpoint prefixes followed by endpoint names
and associated options described next. A shorthand alias can be used for
diff --git
a/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc
b/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc
index 4b084345e85..52f19987094 100644
---
a/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc
+++
b/components/camel-undertow-spring-security/src/main/docs/undertow-spring-security.adoc
@@ -27,8 +27,8 @@ Configuration has to provide the following security attribute:
[width="100%"]
|===
| Name | Description | Type
-| *securityFiler* | Provides security filter gained from configured spring
security (5.x). Filter could be obtained,
-for example, from DelegatingFilterProxyRegistrationBean. | Filter
+| `securityFiler` | Provides security filter gained from configured spring
security (5.x). Filter could be obtained,
+for example, from `DelegatingFilterProxyRegistrationBean`. | Filter
|===
Each exchange created by Undertow endpoint with spring security contains
header 'SpringSecurityProvider_principal' (
diff --git a/components/camel-undertow/src/main/docs/undertow-component.adoc
b/components/camel-undertow/src/main/docs/undertow-component.adoc
index 43d2361c118..e2de917c72c 100644
--- a/components/camel-undertow/src/main/docs/undertow-component.adoc
+++ b/components/camel-undertow/src/main/docs/undertow-component.adoc
@@ -18,7 +18,7 @@ The Undertow component provides HTTP and WebSocket based
endpoints for consuming
and producing HTTP/WebSocket requests.
That is, the Undertow component behaves as a simple Web server.
-Undertow can also be used as a http client that means you can also use
+Undertow can also be used as an HTTP client that means you can also use
it with Camel as a producer.
Since the component also supports WebSocket
@@ -70,7 +70,9 @@ include::partial$component-endpoint-options.adoc[]
include::partial$component-endpoint-headers.adoc[]
// component headers: END
-== Message Headers
+== Usage
+
+=== Message Headers
Camel uses the same message headers as the xref:http-component.adoc[HTTP]
component. It also uses `Exchange.HTTP_CHUNKED,CamelHttpChunked` header to
turn on or turn off
@@ -81,7 +83,42 @@ For example, given a client request with the URL,
`\http://myserver/myserver?orderid=123`, the exchange will contain a
header named `orderid` with the value `123`.
-== HTTP Producer Example
+=== Using localhost as host
+
+When you specify `localhost` in a URL, Camel exposes the endpoint only
+on the local TCP/IP network interface, so it cannot be accessed from
+outside the machine it operates on.
+
+If you need to expose an Undertow endpoint on a specific network interface,
+the numerical IP address of this interface should be used as the host.
+If you need to expose an Undertow endpoint on all network interfaces, the
+`0.0.0.0` address should be used.
+
+To listen across an entire URI prefix, see
+xref:manual:faq:how-do-i-let-jetty-match-wildcards.adoc[How do I let Jetty
match wildcards?].
+
+If you actually want to expose routes by HTTP and already have a
+Servlet, you should instead refer to the
+xref:servlet-component.adoc[Servlet Transport].
+
+=== Security provider
+
+To plug in a security provider for endpoint authentication, implement SPI
interface
+`org.apache.camel.component.undertow.spi.UndertowSecurityProvider`.
+
+Undertow component locates all implementations of `UndertowSecurityProvider`
using
+Java SPI (Service Provider Interfaces).
+If there is an object passed to the component as parameter
`securityConfiguration` and provider accepts it.
+Provider will be used
+for authentication of all requests.
+
+Property `requireServletContext` of security providers forces the Undertow
server to start
+with servlet context. There will be no servlet actually handled. This feature
is meant only
+for use with servlet filters, which needs servlet context for their
functionality.
+
+== Examples
+
+=== HTTP Producer Example
The following is a basic example of how to send an HTTP request to an
existing HTTP endpoint.
@@ -109,7 +146,7 @@ XML::
====
-== HTTP Consumer Example
+=== HTTP Consumer Example
In this sample we define a route that exposes a HTTP service at
`\http://localhost:8080/myapp/myservice`:
@@ -122,7 +159,7 @@ In this sample we define a route that exposes a HTTP
service at
</route>
----
-== WebSocket Example
+=== WebSocket Example
In this sample we define a route that exposes a WebSocket service at
`\http://localhost:8080/myapp/mysocket` and returns back a response to the
same channel:
@@ -136,38 +173,4 @@ In this sample we define a route that exposes a WebSocket
service at
</route>
----
-== Using localhost as host
-
-When you specify `localhost` in a URL, Camel exposes the endpoint only
-on the local TCP/IP network interface, so it cannot be accessed from
-outside the machine it operates on.
-
-If you need to expose an Undertow endpoint on a specific network interface,
-the numerical IP address of this interface should be used as the host.
-If you need to expose an Undertow endpoint on all network interfaces, the
-`0.0.0.0` address should be used.
-
-To listen across an entire URI prefix, see
-xref:manual:faq:how-do-i-let-jetty-match-wildcards.adoc[How do I let Jetty
match wildcards?].
-
-If you actually want to expose routes by HTTP and already have a
-Servlet, you should instead refer to the
-xref:servlet-component.adoc[Servlet Transport].
-
-== Security provider
-
-To plug in a security provider for endpoint authentication, implement SPI
interface
-`org.apache.camel.component.undertow.spi.UndertowSecurityProvider`.
-
-Undertow component locates all implementations of `UndertowSecurityProvider`
using
-Java SPI (Service Provider Interfaces).
-If there is an object passed to the component as parameter
`securityConfiguration` and provider accepts it.
-Provider will be used
-for authentication of all requests.
-
-Property `requireServletContext` of security providers forces the Undertow
server to start
-with servlet context. There will be no servlet actually handled. This feature
is meant only
-for use with servlet filters, which needs servlet context for their
functionality.
-
-
include::spring-boot:partial$starter.adoc[]
diff --git
a/components/camel-univocity-parsers/src/main/docs/univocityFixed-dataformat.adoc
b/components/camel-univocity-parsers/src/main/docs/univocityFixed-dataformat.adoc
index 074668243e8..6d1f68f6088 100644
---
a/components/camel-univocity-parsers/src/main/docs/univocityFixed-dataformat.adoc
+++
b/components/camel-univocity-parsers/src/main/docs/univocityFixed-dataformat.adoc
@@ -24,7 +24,7 @@ tabulation
Thus, there are three data formats based on uniVocity-parsers.
If you use Maven, you can add the following to your `pom.xml`,
-substituting the version number for the latest and greatest release.
+substituting the version number for the latest release.
[source,xml]
----------------------------------------------------
diff --git a/components/camel-velocity/src/main/docs/velocity-component.adoc
b/components/camel-velocity/src/main/docs/velocity-component.adoc
index 29ef11673fa..6aaf688148a 100644
--- a/components/camel-velocity/src/main/docs/velocity-component.adoc
+++ b/components/camel-velocity/src/main/docs/velocity-component.adoc
@@ -75,7 +75,9 @@ $in.setHeader("fruit", "Apple")
The `fruit` header is now accessible from the `message.out.headers`.
-== Velocity Context
+== Usage
+
+=== Velocity Context
Camel will provide exchange information in the Velocity context (just a
`Map`).
@@ -115,7 +117,7 @@ VelocityContext velocityContext = new
VelocityContext(variableMap);
exchange.getIn().setHeader("CamelVelocityContext", velocityContext);
-----------------------------------------------------------------------
-== Hot reloading
+=== Hot reloading
The Velocity template resource is, by default, hot reloadable for both
file and classpath resources (expanded jar). If you set
@@ -123,7 +125,7 @@ file and classpath resources (expanded jar). If you set
hot reloading is not possible. This scenario can be used in production
when the resource never changes.
-== Dynamic templates
+=== Dynamic templates
Camel provides two headers by which you can define a different resource
location for a template or the template content itself. If any of these
@@ -134,10 +136,10 @@ resource. This allows you to provide a dynamic template
at runtime.
|=======================================================================
|Header |Type |Description
-|CamelVelocityResourceUri |String |A URI for the template resource to use
instead of the
+|`CamelVelocityResourceUri` |String |A URI for the template resource to use
instead of the
endpoint configured.
-|CamelVelocityTemplate |String |The template to use instead of the endpoint
configured.
+|`CamelVelocityTemplate` |String |The template to use instead of the endpoint
configured.
|=======================================================================
== Examples
@@ -202,7 +204,7 @@ from("direct:in").
to("velocity:dummy?allowTemplateFromHeader=true"");
---------------------------------------------------------------------------------------------------------------
-== The Email Example
+=== The Email Example
In this sample, we want to use Velocity templating for an order
confirmation email. The email template is laid out in Velocity as:
diff --git
a/components/camel-vertx/camel-vertx-http/src/main/docs/vertx-http-component.adoc
b/components/camel-vertx/camel-vertx-http/src/main/docs/vertx-http-component.adoc
index 63e8c40fa9e..9f831760397 100644
---
a/components/camel-vertx/camel-vertx-http/src/main/docs/vertx-http-component.adoc
+++
b/components/camel-vertx/camel-vertx-http/src/main/docs/vertx-http-component.adoc
@@ -55,6 +55,7 @@ include::partial$component-endpoint-headers.adoc[]
// component headers: END
== Usage
+
The following example shows how to send a request to an HTTP endpoint.
You can override the URI configured on the `vertx-http` producer via headers
`Exchange.HTTP_URI` and `Exchange.HTTP_PATH`.
@@ -65,13 +66,13 @@ from("direct:start")
.to("vertx-http:https://camel.apache.org");
----
-== URI Parameters
+=== URI Parameters
The `vertx-http` producer supports URI parameters to be sent to the HTTP
server. The URI parameters can either be set directly on the endpoint
URI, or as a header with the key `Exchange.HTTP_QUERY` on the message.
-== Response code
+=== Response code
Camel will handle, according to the HTTP response code:
@@ -83,13 +84,13 @@ with the information.
* Response code is 400+, Camel regards it as an external server failure
and will throw a `HttpOperationFailedException` with the information.
-== throwExceptionOnFailure
+=== throwExceptionOnFailure
The option, `throwExceptionOnFailure`, can be set to `false` to prevent
the `HttpOperationFailedException` from being thrown for failed response
codes. This allows you to get any response from the remote server.
-== Exceptions
+=== Exceptions
`HttpOperationFailedException` exception contains the following information:
@@ -99,7 +100,7 @@ codes. This allows you to get any response from the remote
server.
* Response body as a `java.lang.String`, if server provided a body as
response
-== HTTP method
+=== HTTP method
The following algorithm determines the HTTP method to be used: +
1. Use method provided as endpoint configuration (`httpMethod`). +
@@ -109,7 +110,7 @@ The following algorithm determines the HTTP method to be
used: +
5. `POST` if there is data to send (body is not `null`). +
6. `GET` otherwise.
-== HTTP form parameters
+=== HTTP form parameters
You can send HTTP form parameters in one of two ways.
@@ -119,11 +120,11 @@ body is a `String` formatted as form variables. For
example `param1=value1¶m
2. Set the message body as a
https://vertx.io/docs/apidocs/io/vertx/core/MultiMap.html[MultiMap] which
allows you to
configure form parameter names and values.
-== Multipart form data
+=== Multipart form data
You can upload text or binary files by setting the message body as a
https://vertx.io/docs/apidocs/io/vertx/ext/web/multipart/MultipartForm.html[MultipartForm].
-== Customizing Vert.x Web Client options
+=== Customizing Vert.x Web Client options
When finer control of the Vert.x Web Client configuration is required, you can
bind a custom
https://vertx.io/docs/apidocs/io/vertx/ext/web/client/WebClientOptions.html[WebClientOptions]
instance to the registry.
@@ -145,13 +146,13 @@ from("direct:start")
.to("vertx-http:http://localhost:8080?webClientOptions=#clientOptions")
---------------------------
-== SSL
+=== SSL
The Vert.x HTTP component supports SSL/TLS configuration through the
xref:manual::camel-configuration-utilities.adoc[Camel JSSE Configuration
Utility].
It is also possible to configure SSL options by providing a custom
`WebClientOptions`.
-== Session Management
+=== Session Management
Session management can be enabled via the `sessionManagement` URI option. When
enabled, an in-memory cookie store is used to track cookies.
This can be overridden by providing a custom `CookieStore` via the
`cookieStore` URI option.
diff --git
a/components/camel-vertx/camel-vertx-websocket/src/main/docs/vertx-websocket-component.adoc
b/components/camel-vertx/camel-vertx-websocket/src/main/docs/vertx-websocket-component.adoc
index 9c6f98c0a8d..56ef2227769 100644
---
a/components/camel-vertx/camel-vertx-websocket/src/main/docs/vertx-websocket-component.adoc
+++
b/components/camel-vertx/camel-vertx-websocket/src/main/docs/vertx-websocket-component.adoc
@@ -55,7 +55,7 @@ include::partial$component-endpoint-headers.adoc[]
// component headers: END
== Usage
-The following example shows how to expose a WebSocket on
http://localhost:8080/echo and returns an 'echo' response back to the same
channel:
+The following example shows how to expose a WebSocket on
http://localhost:8080/echo and returns an '_echo_' response back to the same
channel:
[source,java]
----
@@ -72,7 +72,7 @@
from("vertx-websocket:my.websocket.com:8080/chat?consumeAsClient=true")
.log("Got WebSocket message ${body}");
----
-== Path & query parameters
+=== Path & query parameters
The WebSocket server consumer supports the configuration of parameterized
paths. The path parameter value will be set
as a Camel exchange header:
@@ -94,7 +94,7 @@ from("vertx-websocket:localhost:8080/chat/{user}")
.log("New message from ${header.user} (${header.role}) >>> ${body}")
----
-== Sending messages to peers connected to the vertx-websocket server consumer
+=== Sending messages to peers connected to the vertx-websocket server consumer
NOTE: This section only applies when producing messages to a WebSocket hosted
by the camel-vertx-websocket consumer.
It is not relevant when producing messages to an externally hosted WebSocket.
@@ -129,7 +129,7 @@ from("direct:broadcastMessage")
.to("vertx-websocket:localhost:8080/chat");
----
-== SSL
+=== SSL
By default, the `ws://` protocol is used, but secure connections with `wss://`
are supported by configuring the consumer or producer
via the `sslContextParameters` URI parameter and the
xref:manual::camel-configuration-utilities.adoc[Camel JSSE Configuration
Utility]
diff --git a/components/camel-wasm/src/main/docs/wasm-component.adoc
b/components/camel-wasm/src/main/docs/wasm-component.adoc
index 2061a66254c..9d165f48f40 100644
--- a/components/camel-wasm/src/main/docs/wasm-component.adoc
+++ b/components/camel-wasm/src/main/docs/wasm-component.adoc
@@ -54,8 +54,9 @@ include::partial$component-endpoint-options.adoc[]
include::partial$component-endpoint-headers.adoc[]
// component headers: END
+== Usage
-== Writing A Wasm processor
+=== Writing A Wasm processor
In _Wasm_, sharing objects between the host, in this case the _JVM_, and the
_Wasm_ module is deliberately restricted and as of today, it requires a number
of steps:
@@ -65,7 +66,7 @@ In _Wasm_, sharing objects between the host, in this case the
_JVM_, and the _Wa
4. From the _Wasm_ module, read the data and process it
5. From the _host_, release the memory when done
-=== Providing functions for memory management
+==== Providing functions for memory management
The module hosting the function *must* provide the functions to
allocate/deallocate memory that *must* be named `alloc` and `dealloc`
respectively.
@@ -89,7 +90,7 @@ pub unsafe extern "C" fn dealloc(ptr: &mut u8, len: i32) {
}
---------------------------------------
-=== Data shapes
+==== Data shapes
It is not possible to share a Java object with the Wasm module directly, and
as mentioned before,
data exchange leverages Wasm's memory that can be accessed by both the host
and the guest runtimes.
@@ -107,7 +108,7 @@ public static class Wrapper {
}
-------------------------------------------------
-=== Data processing
+==== Data processing
The component expects the processing function to have the following signature: