This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new a698688 CAMEL-14191: EIP docs - Add links to last EIP patterns and add new pages if missing content a698688 is described below commit a6986884b40c2102a080317df9bad59e6a16868b Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Wed Nov 20 13:08:24 2019 +0100 CAMEL-14191: EIP docs - Add links to last EIP patterns and add new pages if missing content --- .../assets/images/eip/MessageExpirationIcon.gif | Bin 0 -> 276 bytes .../images/eip/MessageExpirationSolution.gif | Bin 0 -> 4409 bytes .../pages/enterprise-integration-patterns.adoc | 11 ++++++-- .../modules/ROOT/pages/message-expiration.adoc | 31 +++++++++++++++++++++ 4 files changed, 39 insertions(+), 3 deletions(-) diff --git a/docs/user-manual/modules/ROOT/assets/images/eip/MessageExpirationIcon.gif b/docs/user-manual/modules/ROOT/assets/images/eip/MessageExpirationIcon.gif new file mode 100644 index 0000000..8923778 Binary files /dev/null and b/docs/user-manual/modules/ROOT/assets/images/eip/MessageExpirationIcon.gif differ diff --git a/docs/user-manual/modules/ROOT/assets/images/eip/MessageExpirationSolution.gif b/docs/user-manual/modules/ROOT/assets/images/eip/MessageExpirationSolution.gif new file mode 100644 index 0000000..0575f60 Binary files /dev/null and b/docs/user-manual/modules/ROOT/assets/images/eip/MessageExpirationSolution.gif differ diff --git a/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc b/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc index b35c0de..8174f59 100644 --- a/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc +++ b/docs/user-manual/modules/ROOT/pages/enterprise-integration-patterns.adoc @@ -95,14 +95,19 @@ a|image::eip/RequestReplyIcon.gif[image] |xref:request-reply.adoc[Request Reply] |When an application sends a message, how can it get a response from the receiver? +a|image::eip/ReturnAddressIcon.gif[image] +|xref:return-address.adoc[Return Address] |How does a replier know where +to send the reply? + a|image::eip/CorrelationIdentifierIcon.gif[image] |xref:correlation-identifier.adoc[Correlation Identifier] |How does a requestor that has received a reply know which request this is the reply for? -a|image::eip/ReturnAddressIcon.gif[image] -|xref:return-address.adoc[Return Address] |How does a replier know where -to send the reply? +a|image::eip/MessageExpirationIcon.gif[image] +|xref:message-expiration.adoc[Message Expiration] |How can a sender indicate +when a message should be considered stale and thus shouldn’t be processed? + |======================================================================= [[EnterpriseIntegrationPatterns-MessageRouting]] diff --git a/docs/user-manual/modules/ROOT/pages/message-expiration.adoc b/docs/user-manual/modules/ROOT/pages/message-expiration.adoc new file mode 100644 index 0000000..07cd278 --- /dev/null +++ b/docs/user-manual/modules/ROOT/pages/message-expiration.adoc @@ -0,0 +1,31 @@ +[[Message-Expiration]] += Message Expiration + +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? + +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. +The xref:components::aws-sqs-component.adoc[AWS SQS] supports message expiration using its _message visibility_ settings. + +TIP: When using message expiration then mind about keeping clock's synchronized among the systems. + +== Sample + +A message should expire after 5 seconds, if a consumer is not available to receive and process the message. + +[source,java] +---- + from("direct:cheese") + .to("jms:queueu:cheese?timeToLive=5000"); +---- + + +