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 35a21a3 CAMEL-16861: Cleanup and update EIP docs
35a21a3 is described below
commit 35a21a3641278737a268debb413af1d44540a79c
Author: Claus Ibsen <[email protected]>
AuthorDate: Mon Oct 4 17:12:41 2021 +0200
CAMEL-16861: Cleanup and update EIP docs
---
.../src/main/java/org/apache/camel/Message.java | 4 +--
.../src/main/docs/modules/eips/pages/message.adoc | 42 +++++++---------------
2 files changed, 14 insertions(+), 32 deletions(-)
diff --git a/core/camel-api/src/main/java/org/apache/camel/Message.java
b/core/camel-api/src/main/java/org/apache/camel/Message.java
index 3a748fe..fecc3a3 100644
--- a/core/camel-api/src/main/java/org/apache/camel/Message.java
+++ b/core/camel-api/src/main/java/org/apache/camel/Message.java
@@ -33,7 +33,7 @@ import org.apache.camel.spi.HeadersMapFactory;
public interface Message {
/**
- * Clears the message from user data so it may be reused.
+ * Clears the message from user data, so the message can be reused.
* <p/>
* <b>Important:</b> This API is NOT intended for Camel end users, but
used internally by Camel itself.
*/
@@ -42,7 +42,7 @@ public interface Message {
/**
* Returns the id of the message.
* <p/>
- * By default the message uses the same id as {@link
Exchange#getExchangeId()} as messages are associated with the
+ * By default, the message uses the same id as {@link
Exchange#getExchangeId()} as messages are associated with the
* exchange and using different IDs does not offer much value. Another
reason is to optimize for performance to
* avoid generating new IDs.
* <p/>
diff --git
a/core/camel-core-engine/src/main/docs/modules/eips/pages/message.adoc
b/core/camel-core-engine/src/main/docs/modules/eips/pages/message.adoc
index 5b0cd90..0aa64a9 100644
--- a/core/camel-core-engine/src/main/docs/modules/eips/pages/message.adoc
+++ b/core/camel-core-engine/src/main/docs/modules/eips/pages/message.adoc
@@ -8,36 +8,18 @@ interface.
image::eip/MessageSolution.gif[image]
-To support various message
xref:latest@manual:ROOT:exchange-pattern.adoc[exchange patterns]
-like one way xref:event-message.adoc[Event Message] and
-xref:requestReply-eip.adoc[Request Reply] messages Camel uses an
-xref:latest@manual:ROOT:exchange.adoc[Exchange] interface which has a
*pattern* property
-which can be set to *InOnly* for an xref:event-message.adoc[Event
-Message] which has a single inbound Message, or *InOut* for a
-xref:requestReply-eip.adoc[Request Reply] where there is an inbound and
-outbound message.
+The `org.apache.camel.Message` is the _data record_ that represents the
message part
+of the xref:latest@manual:ROOT:exchange.adoc[Exchange].
-Here is a basic example of sending a Message to a route in *InOnly* and
-*InOut* modes using a `ProducerTemplate`
+The message contains the following information:
-[source,java]
-----
-//InOnly
-getContext().createProducerTemplate().sendBody("direct:startInOnly", "Hello
World");
+- _body_ - the message body (i.e. payload
+- _headers_ - headers with additional information
+- _messageId_ - Unique id of the message.
+ By default, the message uses the same id as `Exchange.getExchangeId` as
messages are associated with the
+ `Exchange` and using different IDs does not offer much value. Another reason
is to optimize for performance to avoid generating new IDs.
+ A few Camel components do provide their own message IDs such as the JMS
components.
+- _timestamp_ - The timestamp the message originates from.
+ Some systems like JMS, Kafka, AWS have a timestamp on the event/message,
that Camel received.
+ This method returns the timestamp, if a timestamp exists.
-//InOut
-Object result =
getContext().createProducerTemplate().requestBody("direct:startInOut", "Hello
World");
-----
-
-And an example with routes:
-
-[source,java]
-----
-from("direct:startInOnly")
- .inOnly("bean:process");
-
-from("direct:startInOut")
- .inOut("bean:process");
-----
-
-See xref:to-eip.adoc[to-eip with pattern]