Repository: camel Updated Branches: refs/heads/master fcb163d4a -> 4955dab17
Porting more wiki pages. Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4955dab1 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4955dab1 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4955dab1 Branch: refs/heads/master Commit: 4955dab173cae242e47a6e98e6feb6a6dc3fb3c1 Parents: fcb163d Author: Hiram Chirino <hi...@hiramchirino.com> Authored: Mon Jan 25 14:25:49 2016 -0500 Committer: Hiram Chirino <hi...@hiramchirino.com> Committed: Mon Jan 25 14:25:49 2016 -0500 ---------------------------------------------------------------------- camel-website/pom.xml | 159 +++++----- docs/user-manual/en/SUMMARY.md | 89 +++++- docs/user-manual/en/architecture.adoc | 44 +++ .../en/architecture.data/camel-components.png | Bin 0 -> 229901 bytes docs/user-manual/en/endpoint.adoc | 36 +++ .../en/enterprise-integration-patterns.adoc | 306 +++++++++++++++++++ .../clear.png | Bin 0 -> 26517 bytes docs/user-manual/en/event-message.adoc | 86 ++++++ docs/user-manual/en/exchange-pattern.adoc | 27 ++ docs/user-manual/en/exchange.adoc | 22 ++ docs/user-manual/en/getting-started.adoc | 79 +++++ docs/user-manual/en/message.adoc | 69 +++++ docs/user-manual/en/registry.adoc | 20 ++ docs/user-manual/en/request-reply.adoc | 60 ++++ 14 files changed, 908 insertions(+), 89 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/camel-website/pom.xml ---------------------------------------------------------------------- diff --git a/camel-website/pom.xml b/camel-website/pom.xml index bb82469..ef4946b 100644 --- a/camel-website/pom.xml +++ b/camel-website/pom.xml @@ -28,90 +28,85 @@ <packaging>jar</packaging> <name>Camel Website</name> - <profiles> - <profile> - <id>release</id> - <build> - <plugins> - <plugin> - <groupId>com.github.eirslett</groupId> - <artifactId>frontend-maven-plugin</artifactId> - <version>0.0.27</version> - <executions> - <execution> - <id>install node and npm</id> - <goals> - <goal>install-node-and-npm</goal> - </goals> - <phase>generate-sources</phase> - <configuration> - <nodeVersion>v0.10.32</nodeVersion> - <npmVersion>1.4.12</npmVersion> - </configuration> - </execution> - <execution> - <id>npm install</id> - <goals> - <goal>npm</goal> - </goals> - <phase>generate-sources</phase> - <configuration> - <arguments>install</arguments> - </configuration> - </execution> - </executions> - </plugin> - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <version>1.6</version> - <executions> - <execution> - <phase>generate-sources</phase> - <configuration> - <target> - <condition property="gitbook.cmd" - value="${basedir}/node_modules/.bin/gitbook.cmd" - else="${basedir}/node_modules/.bin/gitbook"> - <os family="windows" /> - </condition> + <build> + <plugins> + <plugin> + <groupId>com.github.eirslett</groupId> + <artifactId>frontend-maven-plugin</artifactId> + <version>0.0.27</version> + <executions> + <execution> + <id>install node and npm</id> + <goals> + <goal>install-node-and-npm</goal> + </goals> + <phase>generate-sources</phase> + <configuration> + <nodeVersion>v0.10.32</nodeVersion> + <npmVersion>1.4.12</npmVersion> + </configuration> + </execution> + <execution> + <id>npm install</id> + <goals> + <goal>npm</goal> + </goals> + <phase>generate-sources</phase> + <configuration> + <arguments>install</arguments> + </configuration> + </execution> + </executions> + </plugin> + <plugin> + <artifactId>maven-antrun-plugin</artifactId> + <version>1.6</version> + <executions> + <execution> + <phase>generate-sources</phase> + <configuration> + <target> + <condition property="gitbook.cmd" + value="${basedir}/node_modules/.bin/gitbook.cmd" + else="${basedir}/node_modules/.bin/gitbook"> + <os family="windows" /> + </condition> - <!-- lets generate the gitbook --> - <mkdir dir="${basedir}/target/docs/user-manual" /> - <copy todir="${basedir}/target/docs/user-manual" > - <fileset dir="${basedir}/../docs/user-manual/en"/> - </copy> - <copy todir="${basedir}/target/docs/user-manual" flatten="true"> - <fileset dir="{basedir}/../../components"> - <include name="**/src/main/docs/**"/> - </fileset> - </copy> + <!-- lets generate the gitbook --> + <mkdir dir="${basedir}/target/docs/user-manual" /> + <copy todir="${basedir}/target/docs/user-manual" > + <fileset dir="${basedir}/../docs/user-manual/en"/> + </copy> + <copy todir="${basedir}/target/docs/user-manual" flatten="true"> + <fileset dir="{basedir}/../../components"> + <include name="**/src/main/docs/**"/> + </fileset> + </copy> - <mkdir dir="${basedir}/target/classes/user-manual" /> - <echo>executing ${gitbook.cmd}</echo> - <exec executable="${gitbook.cmd}"> - <arg value="build" /> - <arg value="${basedir}/target/docs/user-manual" /> - <arg value="${basedir}/target/classes/user-manual" /> - </exec> + <mkdir dir="${basedir}/target/classes/user-manual" /> + <echo>executing ${gitbook.cmd}</echo> + <exec executable="${gitbook.cmd}"> + <arg value="build" /> + <arg value="${basedir}/target/docs/user-manual" /> + <arg value="${basedir}/target/classes/user-manual" /> + </exec> - <condition property="grunt.cmd" - value="${basedir}/node_modules/.bin/grunt.cmd" - else="${basedir}/node_modules/.bin/grunt"> - <os family="windows" /> - </condition> - <echo>executing ${grunt.cmd}</echo> - <exec executable="${grunt.cmd}" failonerror="false"/> + <condition property="grunt.cmd" + value="${basedir}/node_modules/.bin/grunt.cmd" + else="${basedir}/node_modules/.bin/grunt"> + <os family="windows" /> + </condition> + <echo>executing ${grunt.cmd}</echo> + <exec executable="${grunt.cmd}" failonerror="false"/> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> + </target> + </configuration> + <goals> + <goal>run</goal> + </goals> + </execution> + </executions> + </plugin> + </plugins> + </build> </project> http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/SUMMARY.md ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/SUMMARY.md b/docs/user-manual/en/SUMMARY.md index 208916e..cc95e01 100644 --- a/docs/user-manual/en/SUMMARY.md +++ b/docs/user-manual/en/SUMMARY.md @@ -2,10 +2,85 @@ * [Introduction](README.md) * [Legal Notice](notice.md) -* Components References - * [Async Http Client (AHC)](ahc.adoc) - * [AHC Websocket (AHC-WS)](ahc-ws.adoc) - * [Amqp](amqp.adoc) - * [Atom](atom.adoc) - * [CDI](cdi.adoc) - * [JMS](jms.adoc) +* [Getting Started](getting-started.adoc) + +* [Architecture](architecture.adoc) + * [Endpoint](endpoint.adoc) + * [Exchange](exchange.adoc) + * [Exchange Pattern](exchange-pattern.adoc) + * [Registry](registry.adoc) + +<!-- + * [Dozer Type Conversion](dozer-type-conversion.adoc) + * [AOP](aop.adoc) + * [Async](async.adoc) + * [BAM](bam.adoc) + * [Batch Consumer](batch-consumer.adoc) + * [BrowsableEndpoint](browsable-endpoint.adoc) + * [CamelContext](camelcontext.adoc) + * [Camel-Core](camel-core.adoc) + * [Debugger](debugger.adoc) + * [Delay Interceptor](delay-interceptor.adoc) + * [Dependency Injection](dependency-injections.adoc) + * [DSL](dsl.adoc) + * [Error Handler](.adoc) + * [Exchange](.adoc) + * [Exchange Pattern](.adoc) + * [Expression](.adoc) + * [Injector](.adoc) + * [Intercept](.adoc) + * [Inversion Of Control With Smart Defaults](.adoc) + * [Languages](.adoc) + * [Lifecycle](.adoc) + * [OnCompletion](.adoc) + * [Pluggable Class Resolvers](.adoc) + * [Predicate](.adoc) + * [Processor](.adoc) + * [RouteBuilder](.adoc) + * [RoutePolicy](.adoc) + * [Routes](.adoc) + * [ServicePool](.adoc) + * [Stream caching](.adoc) + * [ToAsync](.adoc) + * [Tracer](.adoc) + * [Transport](.adoc) + * [Type Converter](.adoc) + * [URIs](.adoc) + * [Xml Configuration](.adoc) + * [ProcessorFactory](.adoc) + * [Asynchronous Routing Engine](.adoc) + * [Security](.adoc) + * [UuidGenerator](.adoc) + * [Binding](.adoc) + * [RX](.adoc) + * [CEP](.adoc) + * [BacklogTracer](.adoc) + * [Endpoint Annotations](.adoc) + * [ComponentConfiguration](.adoc) + * [BacklogDebugger](.adoc) + * [EndpointCompleter](.adoc) + * [Clustering and loadbalancing](.adoc) + * [Threading Model](.adoc) +--> + +* [Enterprise Integration Patterns](enterprise-integration-patterns.adoc) + * [Event Message](event-message.adoc) + * [Message](message.adoc) + * [Request Reply](request-reply.adoc) + +* Components + * [Async Http Client (AHC)](ahc.adoc) + * [AHC Websocket (AHC-WS)](ahc-ws.adoc) + * [Amqp](amqp.adoc) + * [Atom](atom.adoc) + * [CDI](cdi.adoc) + * [JMS](jms.adoc) + +<!-- +* [Expession Languages](languages.adoc) + * [Bean Language](bean-language.adoc) + * [Constant](constant.adoc) + +* [Data Formats](data-format.adoc) +--> + http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/architecture.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/architecture.adoc b/docs/user-manual/en/architecture.adoc new file mode 100644 index 0000000..b789485 --- /dev/null +++ b/docs/user-manual/en/architecture.adoc @@ -0,0 +1,44 @@ +[[Architecture-Architecture]] +Architecture +~~~~~~~~~~~~ + +Camel uses a Java based link:dsl.html[Routing Domain Specific Language +(DSL)] or an link:xml-configuration.html[Xml Configuration] to configure +link:routes.html[routing and mediation rules] which are added to a +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html[CamelContext] +to implement the various +link:enterprise-integration-patterns.html[Enterprise Integration +Patterns]. + +At a high level Camel consists of a +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html[CamelContext] +which contains a collection of link:component.html[Component] instances. +A link:component.html[Component] is essentially a factory of +link:endpoint.html[Endpoint] instances. You can explicitly configure +link:component.html[Component] instances in Java code or an IoC +container like Spring or Guice, or they can be auto-discovered using +link:uris.html[URIs]. + +An link:endpoint.html[Endpoint] acts rather like a URI or URL in a web +application or a Destination in a JMS system; you can communicate with +an endpoint; either sending messages to it or consuming messages from +it. You can then create a +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Producer.html[Producer] +or +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Consumer.html[Consumer] +on an link:endpoint.html[Endpoint] to exchange messages with it. + +The link:dsl.html[DSL] makes heavy use of pluggable +link:languages.html[Languages] to create an +link:expression.html[Expression] or link:predicate.html[Predicate] to +make a truly powerful DSL which is extensible to the most suitable +language depending on your needs. Many of the link:languages.html[Languages] +are also supported as +link:annotation-based-expression-language.html[Annotation Based +Expression Language]. + +[[Architecture-Diagram]] +Diagram +~~~~~~~ + +image:architecture.data/camel-components.png[image] http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/architecture.data/camel-components.png ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/architecture.data/camel-components.png b/docs/user-manual/en/architecture.data/camel-components.png new file mode 100644 index 0000000..c9aa663 Binary files /dev/null and b/docs/user-manual/en/architecture.data/camel-components.png differ http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/endpoint.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/endpoint.adoc b/docs/user-manual/en/endpoint.adoc new file mode 100644 index 0000000..46b0311 --- /dev/null +++ b/docs/user-manual/en/endpoint.adoc @@ -0,0 +1,36 @@ +[[Endpoint-Endpoints]] +Endpoints +~~~~~~~~~ + +Camel supports the link:message-endpoint.html[Message Endpoint] pattern +using the +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html[Endpoint] +interface. Endpoints are usually created by a +link:component.html[Component] and Endpoints are usually referred to in +the link:dsl.html[DSL] via their link:uris.html[URIs]. + +From an Endpoint you can use the following methods + +* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createProducer()[createProducer()] +will create a +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Producer.html[Producer] +for sending message exchanges to the endpoint +* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createConsumer(org.apache.camel.Processor)[createConsumer()] +implements the link:event-driven-consumer.html[Event Driven Consumer] +pattern for consuming message exchanges from the endpoint via a +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Processor.html[Processor] +when creating a +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Consumer.html[Consumer] +* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Endpoint.html#createPollingConsumer()[createPollingConsumer()] +implements the link:polling-consumer.html[Polling Consumer] pattern for +consuming message exchanges from the endpoint via a +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/PollingConsumer.html[PollingConsumer] + +[[Endpoint-SeeAlso]] +See Also +^^^^^^^^ + +* link:configuring-camel.html[Configuring Camel] +* link:message-endpoint.html[Message Endpoint] pattern +* link:uris.html[URIs] +* link:writing-components.html[Writing Components] http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/enterprise-integration-patterns.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/enterprise-integration-patterns.adoc b/docs/user-manual/en/enterprise-integration-patterns.adoc new file mode 100644 index 0000000..fd29da1 --- /dev/null +++ b/docs/user-manual/en/enterprise-integration-patterns.adoc @@ -0,0 +1,306 @@ +[[EnterpriseIntegrationPatterns-EnterpriseIntegrationPatterns]] +Enterprise Integration Patterns +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Camel supports most of the +http://www.eaipatterns.com/toc.html[Enterprise Integration Patterns] +from the excellent book by +http://www.amazon.com/exec/obidos/search-handle-url/105-9796798-8100401?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Gregor%20Hohpe[Gregor +Hohpe] and +http://www.amazon.com/exec/obidos/search-handle-url/105-9796798-8100401?%5Fencoding=UTF8&search-type=ss&index=books&field-author=Bobby%20Woolf[Bobby +Woolf]. + +If you are new to Camel you might want to try the +link:getting-started.html[Getting Started] in the +link:user-guide.html[User Guide] before attempting to implement these +patterns. + +The EIP icons library is available as a Visio stencil file adapted to +render the icons with the Camel color : sand. Download it +link:enterprise-integration-patterns.data/Hohpe_EIP_camel_20150622.zip?version=1&modificationDate=1435069070000&api=v2[here] +for your presentation, functional and technical analysis documents. The +original EIP stencil is also available in +link:enterprise-integration-patterns.data/Hohpe_EIP_camel_OpenOffice.zip?version=1&modificationDate=1245056975000&api=v2[OpenOffice +3.x Draw] (thanks to Marco Garbelini) , +http://www.eaipatterns.com/download/EIP_Visio_stencil.zip[Microsoft +Visio], or http://www.graffletopia.com/stencils/137[Omnigraffle]. + +[[EnterpriseIntegrationPatterns-MessagingSystems]] +Messaging Systems +^^^^^^^^^^^^^^^^^ + +[width="100%",cols="10%,10%,80%",] +|======================================================================= +|image:http://www.eaipatterns.com/img/ChannelIcon.gif[image] +|link:message-channel.html[Message Channel] |How does one application +communicate with another using messaging? + +|image:http://www.eaipatterns.com/img/MessageIcon.gif[image] +|link:message.html[Message] |How can two applications connected by a +message channel exchange a piece of information? + +|image:http://www.eaipatterns.com/img/PipesAndFiltersIcon.gif[image] +|link:pipes-and-filters.html[Pipes and Filters] |How can we perform +complex processing on a message while maintaining independence and +flexibility? + +|image:http://www.eaipatterns.com/img/ContentBasedRouterIcon.gif[image] +|link:message-router.html[Message Router] |How can you decouple +individual processing steps so that messages can be passed to different +filters depending on a set of conditions? + +|image:http://www.eaipatterns.com/img/MessageTranslatorIcon.gif[image] +|link:message-translator.html[Message Translator] |How can systems using +different data formats communicate with each other using messaging? + +|image:http://www.eaipatterns.com/img/MessageEndpointIcon.gif[image] +|link:message-endpoint.html[Message Endpoint] |How does an application +connect to a messaging channel to send and receive messages? +|======================================================================= + +[[EnterpriseIntegrationPatterns-MessagingChannels]] +Messaging Channels +^^^^^^^^^^^^^^^^^^ + +[width="100%",cols="10%,10%,80%",] +|======================================================================= +|image:http://www.eaipatterns.com/img/PointToPointIcon.gif[image] +|link:point-to-point-channel.html[Point to Point Channel] |How can the +caller be sure that exactly one receiver will receive the document or +perform the call? + +|image:http://www.eaipatterns.com/img/PublishSubscribeIcon.gif[image] +|link:publish-subscribe-channel.html[Publish Subscribe Channel] |How can +the sender broadcast an event to all interested receivers? + +|image:http://www.eaipatterns.com/img/DeadLetterChannelIcon.gif[image] +|link:dead-letter-channel.html[Dead Letter Channel] |What will the +messaging system do with a message it cannot deliver? + +|image:http://www.eaipatterns.com/img/GuaranteedMessagingIcon.gif[image] +|link:guaranteed-delivery.html[Guaranteed Delivery] |How can the sender +make sure that a message will be delivered, even if the messaging system +fails? + +|image:http://www.eaipatterns.com/img/MessageBusIcon.gif[image] +|link:message-bus.html[Message Bus] |What is an architecture that +enables separate applications to work together, but in a de-coupled +fashion such that applications can be easily added or removed without +affecting the others? +|======================================================================= + +[[EnterpriseIntegrationPatterns-MessageConstruction]] +Message Construction +^^^^^^^^^^^^^^^^^^^^ + +[width="100%",cols="10%,10%,80%",] +|======================================================================= +|image:http://www.eaipatterns.com/img/EventMessageIcon.gif[image] +|link:event-message.html[Event Message] |How can messaging be used to +transmit events from one application to another? + +|image:http://www.eaipatterns.com/img/RequestReplyIcon.gif[image] +|link:request-reply.html[Request Reply] |When an application sends a +message, how can it get a response from the receiver? + +|image:http://www.eaipatterns.com/img/CorrelationIdentifierIcon.gif[image] +|link:correlation-identifier.html[Correlation Identifier] |How does a +requestor that has received a reply know which request this is the reply +for? + +|image:http://www.eaipatterns.com/img/ReturnAddressIcon.gif[image] +|link:return-address.html[Return Address] |How does a replier know where +to send the reply? +|======================================================================= + +[[EnterpriseIntegrationPatterns-MessageRouting]] +Message Routing +^^^^^^^^^^^^^^^ + +[width="100%",cols="10%,10%,80%",] +|======================================================================= +|image:http://www.eaipatterns.com/img/ContentBasedRouterIcon.gif[image] +|link:content-based-router.html[Content Based Router] |How do we handle +a situation where the implementation of a single logical function (e.g., +inventory check) is spread across multiple physical systems? + +|image:http://www.eaipatterns.com/img/MessageFilterIcon.gif[image] +|link:message-filter.html[Message Filter] |How can a component avoid +receiving uninteresting messages? + +|image:http://www.eaipatterns.com/img/DynamicRouterIcon.gif[image] +|link:dynamic-router.html[Dynamic Router] |How can you avoid the +dependency of the router on all possible destinations while maintaining +its efficiency? + +|image:http://www.eaipatterns.com/img/RecipientListIcon.gif[image] +|link:recipient-list.html[Recipient List] |How do we route a message to +a list of (static or dynamically) specified recipients? + +|image:http://www.eaipatterns.com/img/SplitterIcon.gif[image] +|link:splitter.html[Splitter] |How can we process a message if it +contains multiple elements, each of which may have to be processed in a +different way? + +|image:http://www.eaipatterns.com/img/AggregatorIcon.gif[image] +|link:aggregator2.html[Aggregator] |How do we combine the results of +individual, but related messages so that they can be processed as a +whole? + +|image:http://www.eaipatterns.com/img/ResequencerIcon.gif[image] +|link:resequencer.html[Resequencer] |How can we get a stream of related +but out-of-sequence messages back into the correct order? + +|image:http://www.eaipatterns.com/img/DistributionAggregateIcon.gif[image] +|link:composed-message-processor.html[Composed Message Processor] |How +can you maintain the overall message flow when processing a message +consisting of multiple elements, each of which may require different +processing? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:scatter-gather.html[Scatter-Gather] |How do you maintain the +overall message flow when a message needs to be sent to multiple +recipients, each of which may send a reply? + +|image:http://www.eaipatterns.com/img/RoutingTableIcon.gif[image] +|link:routing-slip.html[Routing Slip] |How do we route a message +consecutively through a series of processing steps when the sequence of +steps is not known at design-time and may vary for each message? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:throttler.html[Throttler] |How can I throttle messages to ensure +that a specific endpoint does not get overloaded, or we don't exceed an +agreed SLA with some external service? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:sampling.html[Sampling] |How can I sample one message out of many +in a given period to avoid downstream route does not get overloaded? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:delayer.html[Delayer] |How can I delay the sending of a message? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:load-balancer.html[Load Balancer] |How can I balance load across a +number of endpoints? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:multicast.html[Multicast] |How can I route a message to a number +of endpoints at the same time? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:loop.html[Loop] |How can I repeat processing a message in a loop? +|======================================================================= + +[[EnterpriseIntegrationPatterns-MessageTransformation]] +Message Transformation +^^^^^^^^^^^^^^^^^^^^^^ + +[width="100%",cols="10%,10%,80%",] +|======================================================================= +|image:http://www.eaipatterns.com/img/DataEnricherIcon.gif[image] +|link:content-enricher.html[Content Enricher] |How do we communicate +with another system if the message originator does not have all the +required data items available? + +|image:http://www.eaipatterns.com/img/ContentFilterIcon.gif[image] +|link:content-filter.html[Content Filter] |How do you simplify dealing +with a large message, when you are interested only in a few data items? + +|image:http://www.eaipatterns.com/img/StoreInLibraryIcon.gif[image] +|link:claim-check.html[Claim Check] |How can we reduce the data volume +of message sent across the system without sacrificing information +content? + +|image:http://www.eaipatterns.com/img/NormalizerIcon.gif[image] +|link:normalizer.html[Normalizer] |How do you process messages that are +semantically equivalent, but arrive in a different format? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:sort.html[Sort] |How can I sort the body of a message? + +|Â |Script |How do I execute a script which may not change the message? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:validate.html[Validate] |How can I validate a message? +|======================================================================= + +[[EnterpriseIntegrationPatterns-MessagingEndpoints]] +Messaging Endpoints +^^^^^^^^^^^^^^^^^^^ + +[width="100%",cols="10%,10%,80%",] +|======================================================================= +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:messaging-mapper.html[Messaging Mapper] |How do you move data +between domain objects and the messaging infrastructure while keeping +the two independent of each other? + +|image:http://www.eaipatterns.com/img/EventDrivenConsumerIcon.gif[image] +|link:event-driven-consumer.html[Event Driven Consumer] |How can an +application automatically consume messages as they become available? + +|image:http://www.eaipatterns.com/img/PollingConsumerIcon.gif[image] +|link:polling-consumer.html[Polling Consumer] |How can an application +consume a message when the application is ready? + +|image:http://www.eaipatterns.com/img/CompetingConsumersIcon.gif[image] +|link:competing-consumers.html[Competing Consumers] |How can a messaging +client process multiple messages concurrently? + +|image:http://www.eaipatterns.com/img/MessageDispatcherIcon.gif[image] +|link:message-dispatcher.html[Message Dispatcher] |How can multiple +consumers on a single channel coordinate their message processing? + +|image:http://www.eaipatterns.com/img/MessageSelectorIcon.gif[image] +|link:selective-consumer.html[Selective Consumer] |How can a message +consumer select which messages it wishes to receive? + +|image:http://www.eaipatterns.com/img/DurableSubscriptionIcon.gif[image] +|link:durable-subscriber.html[Durable Subscriber] |How can a subscriber +avoid missing messages while it's not listening for them? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:idempotent-consumer.html[Idempotent Consumer] |How can a message +receiver deal with duplicate messages? + +|image:http://www.eaipatterns.com/img/TransactionalClientIcon.gif[image] +|link:transactional-client.html[Transactional Client] |How can a client +control its transactions with the messaging system? + +|image:http://www.eaipatterns.com/img/MessagingGatewayIcon.gif[image] +|link:messaging-gateway.html[Messaging Gateway] |How do you encapsulate +access to the messaging system from the rest of the application? + +|image:http://www.eaipatterns.com/img/MessagingAdapterIcon.gif[image] +|link:service-activator.html[Service Activator] |How can an application +design a service to be invoked both via various messaging technologies +and via non-messaging techniques? +|======================================================================= + +[[EnterpriseIntegrationPatterns-SystemManagement]] +System Management +^^^^^^^^^^^^^^^^^ + +[width="100%",cols="10%,10%,80%",] +|======================================================================= +|image:http://www.eaipatterns.com/img/ControlBusIcon.gif[image] +|link:controlbus.html[ControlBus] |How can we effectively administer a +messaging system that is distributed across multiple platforms and a +wide geographic area? + +|image:http://www.eaipatterns.com/img/DetourIcon.gif[image] +|link:detour.html[Detour] |How can you route a message through +intermediate steps to perform validation, testing or debugging +functions? + +|image:http://www.eaipatterns.com/img/WireTapIcon.gif[image] +|link:wire-tap.html[Wire Tap] |How do you inspect messages that travel +on a point-to-point channel? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:message-history.html[Message History] |How can we effectively +analyze and debug the flow of messages in a loosely coupled system? + +|image:http://cwiki.apache.org/confluence/download/attachments/49204/clear.png[image] +|link:logeip.html[Log] |How can I log processing a message? +|======================================================================= http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/enterprise-integration-patterns.data/clear.png ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/enterprise-integration-patterns.data/clear.png b/docs/user-manual/en/enterprise-integration-patterns.data/clear.png new file mode 100644 index 0000000..3e14d4e Binary files /dev/null and b/docs/user-manual/en/enterprise-integration-patterns.data/clear.png differ http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/event-message.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/event-message.adoc b/docs/user-manual/en/event-message.adoc new file mode 100644 index 0000000..a25cf8f --- /dev/null +++ b/docs/user-manual/en/event-message.adoc @@ -0,0 +1,86 @@ +[[EventMessage-EventMessage]] +Event Message +~~~~~~~~~~~~~ + +Camel supports the +http://www.enterpriseintegrationpatterns.com/EventMessage.html[Event +Message] from the link:enterprise-integration-patterns.html[EIP +patterns] by supporting the link:exchange-pattern.html[Exchange Pattern] +on a link:message.html[Message] which can be set to *InOnly* to indicate +a oneway event message. Camel link:components.html[Components] then +implement this pattern using the underlying transport or protocols. + +image:http://www.enterpriseintegrationpatterns.com/img/EventMessageSolution.gif[image] + +The default behaviour of many link:components.html[Components] is InOnly +such as for link:jms.html[JMS], link:file2.html[File] or +link:seda.html[SEDA] + +[TIP] +==== +*Related* + +See the related link:request-reply.html[Request Reply] message. +==== + +[[EventMessage-ExplicitlyspecifyingInOnly]] +Explicitly specifying InOnly +^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +If you are using a component which defaults to InOut you can override +the link:exchange-pattern.html[Exchange Pattern] for an endpoint using +the pattern property. + +[source,java] +------------------------------ +foo:bar?exchangePattern=InOnly +------------------------------ + +From 2.0 onwards on Camel you can specify the +link:exchange-pattern.html[Exchange Pattern] using the DSL. + +*Using the link:fluent-builders.html[Fluent Builders]* + +[source,java] +--------------------------------------------- +from("mq:someQueue"). + setExchangePattern(ExchangePattern.InOnly). + bean(Foo.class); +--------------------------------------------- + +or you can invoke an endpoint with an explicit pattern + +[source,java] +---------------------------- +from("mq:someQueue"). + inOnly("mq:anotherQueue"); +---------------------------- + +*Using the link:spring-xml-extensions.html[Spring XML Extensions]* + +[source,java] +------------------------------ +<route> + <from uri="mq:someQueue"/> + <inOnly uri="bean:foo"/> +</route> +------------------------------ + +[source,java] +----------------------------------- +<route> + <from uri="mq:someQueue"/> + <inOnly uri="mq:anotherQueue"/> +</route> +----------------------------------- + +[[EventMessage-UsingThisPattern]] +Using This Pattern +++++++++++++++++++ + +If you would like to use this EIP Pattern then please read the +link:getting-started.html[Getting Started], you may also find the +link:architecture.html[Architecture] useful particularly the description +of link:endpoint.html[Endpoint] and link:uris.html[URIs]. Then you could +try out some of the link:examples.html[Examples] first before trying +this pattern out. http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/exchange-pattern.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/exchange-pattern.adoc b/docs/user-manual/en/exchange-pattern.adoc new file mode 100644 index 0000000..2df7529 --- /dev/null +++ b/docs/user-manual/en/exchange-pattern.adoc @@ -0,0 +1,27 @@ +[[ExchangePattern-ExchangePattern]] +Exchange Pattern +~~~~~~~~~~~~~~~~ + +There are many different _Message Exchange Patterns_ you can use in +messaging. This concept is also demonstrated in WSDL and JBI's MEPs. + +From there link:enterprise-integration-patterns.html[Enterprise +Integration Patterns] the common examples are + +* link:request-reply.html[Request Reply] +* link:event-message.html[Event Message] (or one way) + +In Camel we have an +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/ExchangePattern.html[ExchangePattern] +enumeration which can be configured on the *exchangePattern* property on +the Message link:exchange.html[Exchange] indicating if a message +exchange is a one way link:event-message.html[Event Message] (InOnly) or +a link:request-reply.html[Request Reply] message exchange (InOut). + +For example to override the default pattern on a link:jms.html[JMS] +endpoint you could use this URI + +[source,java] +--------------------------------- +jms:MyQueue?exchangePattern=InOut +--------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/exchange.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/exchange.adoc b/docs/user-manual/en/exchange.adoc new file mode 100644 index 0000000..510a0da --- /dev/null +++ b/docs/user-manual/en/exchange.adoc @@ -0,0 +1,22 @@ +[[Exchange-MessageExchange]] +Message Exchange +~~~~~~~~~~~~~~~~ + +To support various message link:exchange-pattern.html[exchange patterns] +like one way link:event-message.html[Event Message] and +link:request-reply.html[Request Reply] messages Camel uses an +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Exchange.html[Exchange] +interface which has a *pattern* property which can be set to *InOnly* +for an link:event-message.html[Event Message] which has a single inbound +link:message.html[Message], or *InOut* for a +link:request-reply.html[Request Reply] where there is an inbound and +outbound link:message.html[Message]. + +[[Exchange-SeeAlso]] +See Also +^^^^^^^^ + +* link:event-message.html[Event Message] +* link:request-reply.html[Request Reply] +* link:exchange-pattern.html[Exchange Pattern] +* link:message.html[Message] http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/getting-started.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/getting-started.adoc b/docs/user-manual/en/getting-started.adoc new file mode 100644 index 0000000..79c0de2 --- /dev/null +++ b/docs/user-manual/en/getting-started.adoc @@ -0,0 +1,79 @@ +[[GettingStarted-GettingStarted]] +Getting Started +~~~~~~~~~~~~~~~ + +First you need to link:download.html[Download] the Camel distribution; +or you could grab the link:source.html[Source] and try +link:building.html[Building] it yourself. + +Then come back here and you might want to read the following +documentation before continuing: + +* link:book-getting-started.html[Longer Getting Started Guide] +* Find out about link:enterprise-integration-patterns.html[Enterprise +Integration Patterns] and how to implement them with Camel +* Review the link:architecture.html[Architecture] guide to see how to +build link:routes.html[Routes] using the Java link:dsl.html[DSL] or +link:spring.html[Spring] based link:xml-configuration.html[Xml +Configuration] + +[[GettingStarted-WorkingwithCamelContextsandRouteBuilders]] +Working with CamelContexts and RouteBuilders +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +To get started with Camel: + +1. Create a link:camelcontext.html[CamelContext]. +2. Optionally, link:configuring-camel.html[configure components or +endpoints]. +3. Add whatever routing rules you wish using the link:dsl.html[DSL] and +link:routebuilder.html[RouteBuilder] or using +link:xml-configuration.html[Xml Configuration]. +4. link:lifecycle.html[Start the context]. + +When your application is closing you may wish to +link:lifecycle.html[stop the context] + +When you are ready, why not link:walk-through-an-example.html[Walk +through an Example]? + + And then continue the walk link:walk-through-another-example.html[Walk +through another example] + + And after the walks head over to the link:tutorials.html[tutorials]. + +[[GettingStarted-WorkingwithSpring]] +Working with Spring +^^^^^^^^^^^^^^^^^^^ + +If you use Spring as a Dependency Injection container then please refer +to the link:spring.html[Camel Spring documentation]. + +[[GettingStarted-OtherResources]] +Other Resources +^^^^^^^^^^^^^^^ + +We strongly suggest that you brew a cup of coffee or tea and take the 30 +minutes to read one or more of the following resources: + +* http://manning.com/ibsen/chapter1sample.pdf[Camel in Action, Chapter 1 +(direct link)] free chapter 1 of the http://www.manning.com/ibsen[Camel +in Action] book. Highly recommended to read to learn what Camel is and +the basic Camel concepts. This is a free chapter you can download +directly as a pdf (about 20 pages) and introduces you to Camel. We have +been told by experience Camel end users they wished this chapter was +available to them when they started learning Camel. + +* http://java.dzone.com/articles/open-source-integration-apache[Open +Source Integration with Apache Camel and How Fuse IDE Can Help] by +Jonathan Anstey. Updated article of the +http://architects.dzone.com/articles/apache-camel-integration[Apache +Camel: Integration Nirvana]. Great article to learn what Camel is and +has a good use case example. + +* Several of the vendors on the +link:commercial-camel-offerings.html[Commercial Camel Offerings] page +also offer various tutorials, webinars, examples, etc.... that may be +useful. + +* link:articles.html[Articles] is a link collection with articles, +blogs, podcasts, presentations and the likes about Camel done by people +from the community. http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/message.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/message.adoc b/docs/user-manual/en/message.adoc new file mode 100644 index 0000000..c75a2bb --- /dev/null +++ b/docs/user-manual/en/message.adoc @@ -0,0 +1,69 @@ +[[Message-Message]] +Message +^^^^^^^ + +Camel supports the +http://www.enterpriseintegrationpatterns.com/Message.html[Message] from +the link:enterprise-integration-patterns.html[EIP patterns] using the +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/Message.html[Message] +interface. + +image:http://www.enterpriseintegrationpatterns.com/img/MessageSolution.gif[image] + +To support various message link:exchange-pattern.html[exchange patterns] +like one way link:event-message.html[Event Message] and +link:request-reply.html[Request Reply] messages Camel uses an +link:exchange.html[Exchange] interface which has a *pattern* property +which can be set to *InOnly* for an link:event-message.html[Event +Message] which has a single inbound Message, or *InOut* for a +link:request-reply.html[Request Reply] where there is an inbound and +outbound message. + +Here is a basic example of sending a Message to a route in *InOnly* and +*InOut* modes + +*Requestor Code* + +[source,java] +--------------------------------------------------------------------------------------------------------------- +//InOnly +getContext().createProducerTemplate().sendBody("direct:startInOnly", "Hello World"); + +//InOut +String result = (String) getContext().createProducerTemplate().requestBody("direct:startInOut", "Hello World"); +--------------------------------------------------------------------------------------------------------------- + +*Route Using the link:fluent-builders.html[Fluent Builders]* + +[source,java] +-------------------------------------------------- +from("direct:startInOnly").inOnly("bean:process"); + +from("direct:startInOut").inOut("bean:process"); +-------------------------------------------------- + +*Route Using the link:spring-xml-extensions.html[Spring XML Extensions]* + +[source,java] +---------------------------------- +<route> + <from uri="direct:startInOnly"/> + <inOnly uri="bean:process"/> +</route> + +<route> + <from uri="direct:startInOut"/> + <inOut uri="bean:process"/> +</route> +---------------------------------- + +[[Message-UsingThisPattern]] +Using This Pattern +++++++++++++++++++ + +If you would like to use this EIP Pattern then please read the +link:getting-started.html[Getting Started], you may also find the +link:architecture.html[Architecture] useful particularly the description +of link:endpoint.html[Endpoint] and link:uris.html[URIs]. Then you could +try out some of the link:examples.html[Examples] first before trying +this pattern out. http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/registry.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/registry.adoc b/docs/user-manual/en/registry.adoc new file mode 100644 index 0000000..584a9c0 --- /dev/null +++ b/docs/user-manual/en/registry.adoc @@ -0,0 +1,20 @@ +[[Registry-Registry]] +Registry +~~~~~~~~ + +Camel supports a pluggable +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/spi/Registry.html[Registry] +plugin strategy. This allows Camel to easily work with some kind of +registry like + +* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/SimpleRegistry.html[SimpleRegistry] +which is a simple `java.util.Map` based registry. +* http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/impl/JndiRegistry.html[JndiRegistry] +which uses the link:jndi.html[JNDI] InitialContext as the registry +* http://camel.apache.org/maven/current/camel-spring/apidocs/org/apache/camel/spring/spi/ApplicationContextRegistry.html[ApplicationContextRegistry] +if you are using Spring, it uses the ApplicationContext as the registry + +You can also access the Registry from the +link:camelcontext.html[CamelContext] via the +http://camel.apache.org/maven/current/camel-core/apidocs/org/apache/camel/CamelContext.html#getRegistry()[camelContext.getRegistry() +method] http://git-wip-us.apache.org/repos/asf/camel/blob/4955dab1/docs/user-manual/en/request-reply.adoc ---------------------------------------------------------------------- diff --git a/docs/user-manual/en/request-reply.adoc b/docs/user-manual/en/request-reply.adoc new file mode 100644 index 0000000..8cf4582 --- /dev/null +++ b/docs/user-manual/en/request-reply.adoc @@ -0,0 +1,60 @@ +[[RequestReply-RequestReply]] +Request Reply +~~~~~~~~~~~~~ + +Camel supports the +http://www.enterpriseintegrationpatterns.com/RequestReply.html[Request +Reply] from the link:enterprise-integration-patterns.html[EIP patterns] +by supporting the link:exchange-pattern.html[Exchange Pattern] on a +link:message.html[Message] which can be set to *InOut* to indicate a +request/reply. Camel link:components.html[Components] then implement +this pattern using the underlying transport or protocols. + +image:http://www.enterpriseintegrationpatterns.com/img/RequestReply.gif[image] + +For example when using link:jms.html[JMS] with InOut the component will +by default perform these actions + +* create by default a temporary inbound queue +* set the JMSReplyTo destination on the request message +* set the JMSCorrelationID on the request message +* send the request message +* consume the response and associate the inbound message to the request +using the JMSCorrelationID (as you may be performing many concurrent +request/responses). + +[TIP] +==== +*Related* + +See the related link:event-message.html[Event Message] message +==== + +[[RequestReply-ExplicitlyspecifyingInOut]] +Explicitly specifying InOut +^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +When consuming messages from link:jms.html[JMS] a Request-Reply is +indicated by the presence of the *JMSReplyTo* header. + +You can explicitly force an endpoint to be in Request Reply mode by +setting the exchange pattern on the URI. e.g. + +[source,java] +--------------------------------- +jms:MyQueue?exchangePattern=InOut +--------------------------------- + +You can specify the exchange pattern in DSL rule or Spring +configuration. + +[[RequestReply-UsingThisPattern]] +Using This Pattern +++++++++++++++++++ + +If you would like to use this EIP Pattern then please read the +link:getting-started.html[Getting Started], you may also find the +link:architecture.html[Architecture] useful particularly the description +of link:endpoint.html[Endpoint] and link:uris.html[URIs]. Then you could +try out some of the link:examples.html[Examples] first before trying +this pattern out.