Skip to content

Commit 67763ac

Browse files
committed
CAMEL-16861: Cleanup docs
1 parent d5fe319 commit 67763ac

14 files changed

Lines changed: 148 additions & 307 deletions

components/camel-seda/src/main/docs/seda-component.adoc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ If you need persistence, reliability or distributed SEDA, try using xref:jms-com
3434
====
3535
*Synchronous*
3636
37-
The xref:direct-component.adoc[Direct] component provides synchronous invocation
38-
of any consumers when a producer sends a message exchange.
37+
The xref:direct-component.adoc[Direct] component provides synchronous invocation (uses no threading; it directly invokes the
38+
consumer when sending) of any consumers when a producer sends a message exchange.
3939
====
4040

4141
== URI format

docs/user-manual/modules/ROOT/pages/endpoint.adoc

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,58 @@ in the xref:registry.adoc[Registry] that the file endpoint should use.
126126
file://inbox?idempontentRepository=#type:org.apache.camel.spi.IdempotentRepository
127127
----
128128

129+
=== Configuring endpoint URIs in XML escaping & sign
130+
131+
If you try and use one of the Camel xref:ROOT:uris.adoc[URIs] in an
132+
XML DSL using the URI query parameter notation, such as:
133+
134+
[source,xml]
135+
----
136+
<route>
137+
<from uri="direct:start?paramA=1&paramB=2"/>
138+
<to uri="mock:result"/>
139+
</route>
140+
----
141+
142+
you might get errors such as...
143+
144+
----
145+
Caused by: org.xml.sax.SAXParseException: The reference to entity "paramB" must end with the ';' delimiter.
146+
at com.sun.org.apache.xerces.internal.util.ErrorHandlerWrapper.createSAXParseException(ErrorHandlerWrapper.java:236)
147+
at
148+
----
149+
150+
This is because in XML you need to escape some special XML characters
151+
like these:
152+
153+
[width="100%",cols="50%,50%",options="header",]
154+
|==================================================
155+
|Special Character |How to escape it in XML
156+
a|`&`
157+
158+
a|`+&amp;+`
159+
160+
a|`<`
161+
162+
a|`+&lt;+`
163+
164+
a|`>`
165+
166+
a|`+&gt;+`
167+
168+
|==================================================
169+
170+
So if you write the following XML it should work...
171+
172+
[source,xml]
173+
----
174+
<route>
175+
<from uri="direct:start?paramA=1&amp;paramB=2"/>
176+
<to uri="mock:result"/>
177+
</route>
178+
----
179+
180+
129181
=== Configuring parameter values using raw values, such as passwords
130182

131183
When configuring endpoint options using URI syntax, then the values is
@@ -322,6 +374,56 @@ The default maximum cache size is 1000.
322374

323375
You need to configure this before xref:ROOT:camelcontext.adoc[CamelContext] is started.
324376

377+
== Configuring time duration using hours, minutes syntax
378+
379+
Some of the Camel xref:ROOT:component.adoc[components] offers options to
380+
specify a time period, which must be entered in millisecond as unit.
381+
382+
This may be unfriendly to read as a human when the value is large such
383+
as `2700000` millis (45 minutes).
384+
385+
In Camel you can configure this in a more readable syntax as explained:
386+
387+
[width="100%",cols="50%,50%",options="header",]
388+
|============
389+
|Syntax |Unit
390+
|h |hour
391+
|m |minute
392+
|s |second
393+
|============
394+
395+
So for example the xref:components::timer-component.adoc[Timer] endpoint can be configured as
396+
follows:
397+
398+
[source,java]
399+
----
400+
from("timer:foo?period=45m").to("log:foo");
401+
----
402+
403+
You can mix and match the units so you can do this as well:
404+
405+
[source,java]
406+
----
407+
from("timer:foo?period=1h15m").to("log:foo");
408+
from("timer:bar?period=2h30s").to("log:bar");
409+
from("timer:bar?period=3h45m58s").to("log:bar");
410+
----
411+
412+
However, you can also use long syntax:
413+
414+
[width="100%",cols="50%,50%",options="header",]
415+
|=========================
416+
|Syntax |Unit
417+
|hour _or_ hours |hour
418+
|minute _or_ minutes |minute
419+
|second _or_ seconds |second
420+
|=========================
421+
422+
[source,java]
423+
----
424+
from("timer:foo?period=45minutes").to("log:foo");
425+
----
426+
325427

326428
== Java Endpoint API
327429

docs/user-manual/modules/ROOT/pages/tracer.adoc

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,50 @@ camel.main.tracing-logging-format = %-4.4s [%-30.30s] [%-50.50s]
137137
----
138138
====
139139

140+
=== Configuring maximum length of message body
141+
142+
When you run Camel with logging, it will log the messages and its
143+
content from time to time.
144+
145+
As some messages can contain very big payloads Camel will by default
146+
clip the log message and only show the first 1000 chars.
147+
148+
You will see this in the log as:
149+
150+
[source,log]
151+
----
152+
DEBUG ProducerCache - >>>> Endpoint[direct:start] Exchange[Message: 01234567890123456789... [Body clipped after 20 chars, total length is 1000]]
153+
----
154+
155+
156+
[tabs]
157+
====
158+
159+
Java::
160+
+
161+
In Java you can set the maximum length as a global option.
162+
+
163+
[source,java]
164+
----
165+
context.getGlobalOptions().put(Exchange.LOG_DEBUG_BODY_MAX_CHARS, "500");
166+
----
167+
168+
Application Properties::
169+
+
170+
You can also set the limit in `application.properties`.
171+
+
172+
[source,properties]
173+
-----
174+
camel.main.globalOptions[CamelLogDebugBodyMaxChars] = 500
175+
-----
176+
====
177+
178+
NOTE: You can customize the limit when Camel clips the body in the log.
179+
You can use a limit of 0 to disable limit, so the entire body is
180+
shown. Setting a negative value, such as -1, means
181+
the message body is not logged at all.
182+
183+
140184
== See Also
141185

142186
- xref:backlog-tracer.adoc[Backlog Tracer]

docs/user-manual/modules/faq/nav.adoc

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,7 @@
1313
** xref:ROOT:languages.adoc[What languages are supported?]
1414
** xref:what-platforms-are-supported.adoc[What platforms are supported?]
1515
** xref:why-the-name-camel.adoc[Why the name Camel?]
16-
** xref:how-do-i-specify-which-method-to-use-when-using-beans-in-routes.adoc[How do I specify which method to use when using beans in routes?]
1716
** xref:how-does-camel-look-up-beans-and-endpoints.adoc[How does Camel look up beans and endpoints?]
18-
** xref:how-do-i-reuse-the-contexttestsupport-class-in-my-unit-tests.adoc[How do I reuse the ContextTestSupport class in my unit tests?]
19-
** xref:how-do-i-set-the-max-chars-when-debug-logging-messages-in-camel.adoc[How do I set the max chars when debug logging messages in Camel?]
20-
** xref:how-do-i-use-uris-with-parameters-in-xml.adoc[How do I use URIs with parameters in XML?]
21-
** xref:how-do-i-write-a-custom-processor-which-sends-multiple-messages.adoc[How do I write a custom Processor which sends multiple messages?]
2217
** xref:how-should-i-invoke-my-pojos-or-spring-services.adoc[How should I invoke my POJOs or Spring Services?]
2318
** xref:how-to-avoid-sending-some-or-all-message-headers.adoc[How to avoid sending some or all message headers?]
2419
** xref:how-to-remove-the-http-protocol-headers-in-the-camel-message.adoc[How to remove the http protocol headers in the camel message?]
@@ -38,9 +33,6 @@
3833
** xref:why-is-the-exception-null-when-i-use-onexception.adoc[Why is the exception null when I use onException?]
3934
** xref:why-use-multiple-camelcontext.adoc[Why use multiple CamelContext?]
4035
** xref:how-do-i-use-log4j.adoc[How do I use log4j?]
41-
** xref:how-do-i-set-the-mep-when-interacting-with-jbi.adoc[How do I set the MEP when interacting with JBI?]
42-
** xref:how-do-the-direct-event-seda-and-vm-endpoints-compare.adoc[How do the direct, event, seda and vm endpoints compare?]
43-
** xref:how-do-the-timer-and-quartz-endpoints-compare.adoc[How do the Timer and Quartz endpoints compare?]
4436
** xref:why-does-my-jms-route-only-consume-one-message-at-once.adoc[Why does my JMS route only consume one message at once?]
4537
** xref:exception-orgapachecamelnosuchendpointexception.adoc[Exception - org.apache.camel.NoSuchEndpointException]
4638
** xref:exception-orgxmlsaxsaxparseexception.adoc[Exception - org.xml.sax.SAXParseException]

docs/user-manual/modules/faq/pages/how-do-i-reuse-the-contexttestsupport-class-in-my-unit-tests.adoc

Lines changed: 0 additions & 7 deletions
This file was deleted.

docs/user-manual/modules/faq/pages/how-do-i-set-the-max-chars-when-debug-logging-messages-in-camel.adoc

Lines changed: 0 additions & 53 deletions
This file was deleted.

docs/user-manual/modules/faq/pages/how-do-i-set-the-mep-when-interacting-with-jbi.adoc

Lines changed: 0 additions & 33 deletions
This file was deleted.

docs/user-manual/modules/faq/pages/how-do-i-specify-time-period-in-a-human-friendly-syntax.adoc

Lines changed: 0 additions & 54 deletions
This file was deleted.

docs/user-manual/modules/faq/pages/how-do-i-specify-which-method-to-use-when-using-beans-in-routes.adoc

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)