This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 e7ecb3a CAMEL-16861: Cleanup and update EIP docs
e7ecb3a is described below
commit e7ecb3a633c96f27fff5612c04bcf5d661e0456b
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Oct 5 11:00:55 2021 +0200
CAMEL-16861: Cleanup and update EIP docs
---
.../docs/modules/eips/pages/message-endpoint.adoc | 25 +++++++++++++++++-----
.../modules/eips/pages/message-expiration.adoc | 25 ++++++++++++++--------
.../src/main/docs/modules/eips/pages/to-eip.adoc | 11 +++++-----
3 files changed, 42 insertions(+), 19 deletions(-)
diff --git
a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-endpoint.adoc
b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-endpoint.adoc
index b7f56fa..77d0a74 100644
---
a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-endpoint.adoc
+++
b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-endpoint.adoc
@@ -15,12 +15,27 @@ rather than directly using the
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Endpoint.html[Endpoint]
interface. It's then a responsibility of the
https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/CamelContext.html[CamelContext]
-to create and activate the necessary Endpoint instances using the
-available
-https://www.javadoc.io/doc/org.apache.camel/camel-api/current/org/apache/camel/Component.html[Component]
-implementations.
+to create and activate the necessary `Endpoint` instances using the
+available xref:components::index.adoc[Components].
== Example
-See first example in xref:to-eip.adoc[To] EIP
+The following example route demonstrates the use of a
xref:components::file-component.adoc[File] consumer endpoint and a
xref:components::jms-component.adoc[JMS] producer endpoint,
+by their xref:latest@manual:ROOT:uris.adoc[URIs]:
+
+[source,java]
+----
+from("file:messages/foo")
+ .to("jms:queue:foo");
+----
+
+And in XML:
+
+[source,xml]
+----
+<route>
+ <from uri="file:messages/foo"/>
+ <to uri="jms:queue:foo"/>
+</route>
+----
diff --git
a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-expiration.adoc
b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-expiration.adoc
index a063a44..9712a44 100644
---
a/core/camel-core-engine/src/main/docs/modules/eips/pages/message-expiration.adoc
+++
b/core/camel-core-engine/src/main/docs/modules/eips/pages/message-expiration.adoc
@@ -4,26 +4,33 @@ Camel supports the
https://www.enterpriseintegrationpatterns.com/patterns/messaging/MessageExpiration.html[Message
Expiration]
from the xref:enterprise-integration-patterns.adoc[EIP patterns].
-How can a sender indicate when a message should be considered stale and thus
shouldn’t be processed?
+How can a sender indicate when a message should be considered stale and thus
should not be processed?
image::eip/MessageExpirationSolution.gif[image]
Set the Message Expiration to specify a time limit how long the message is
viable.
-Message expiration is supported by some Camel components such as
xref:components::jms-component.adoc[JMS]
-or which allows to set a time-to-live value on messages sent to the broker.
+Message expiration is supported by some Camel components such as
xref:components::jms-component.adoc[JMS],
+which uses _time-to-live_ to specify for how long the message is valid.
-TIP: When using message expiration then mind about keeping clock's
synchronized among the systems.
+IMPORTANT: When using message expiration then mind about keeping clock's
synchronized among the systems.
-== Sample
+== Example
-A message should expire after 5 seconds, if a consumer is not available to
receive and process the message.
+A message should expire after 5 seconds:
[source,java]
----
- from("direct:cheese")
- .to("jms:queueu:cheese?timeToLive=5000");
+from("direct:cheese")
+ .to("jms:queueu:cheese?timeToLive=5000");
----
+And in XML
-
+[source,xml]
+----
+<route>
+ <from uri="direct:cheese"/>
+ <to uri="jms:queue:cheese?timeToLive=5000"/>
+</route>
+----
diff --git
a/core/camel-core-engine/src/main/docs/modules/eips/pages/to-eip.adoc
b/core/camel-core-engine/src/main/docs/modules/eips/pages/to-eip.adoc
index b565fee..f4e3403 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/to-eip.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/to-eip.adoc
@@ -20,13 +20,14 @@ See message related documentation
include::partial$eip-options.adoc[]
// eip options: END
-== Samples
+== Example
-The following example route demonstrates the use of a file consumer endpoint
and a JMS producer endpoint.
+The following example route demonstrates the use of a
xref:components::file-component.adoc[File] consumer endpoint and a
xref:components::jms-component.adoc[JMS] producer endpoint,
+by their xref:latest@manual:ROOT:uris.adoc[URIs]:
[source,java]
----
-from("file://local/router/messages/foo")
+from("file:messages/foo")
.to("jms:queue:foo");
----
@@ -35,12 +36,12 @@ And in XML:
[source,xml]
----
<route>
- <from uri="file://local/router/messages/foo"/>
+ <from uri="file:messages/foo"/>
<to uri="jms:queue:foo"/>
</route>
----
-== to-eip with pattern
+=== Using Exchange Pattern
Instead of using `inOnly` and `inOut` you may want to keep using `to`
where you can specify the exchange pattern as shown: