#22909 Fix parameters
* @binVersion@ * @github@ * @samples@ * @exampleCodeService@
This commit is contained in:
parent
4cb9c2436f
commit
0e7a8e1e61
40 changed files with 320 additions and 253 deletions
|
|
@ -71,8 +71,8 @@ You can also create a CamelMessage yourself with the appropriate body and header
|
|||
|
||||
The akka-camel module is implemented as an Akka Extension, the `CamelExtension` object.
|
||||
Extensions will only be loaded once per `ActorSystem`, which will be managed by Akka.
|
||||
The `CamelExtension` object provides access to the [Camel](@github@/akka-camel/src/main/scala/akka/camel/Camel.scala) interface.
|
||||
The [Camel](@github@/akka-camel/src/main/scala/akka/camel/Camel.scala) interface in turn provides access to two important Apache Camel objects, the [CamelContext](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/CamelContext.java) and the `ProducerTemplate`.
|
||||
The `CamelExtension` object provides access to the @extref[Camel](github:akka-camel/src/main/scala/akka/camel/Camel.scala) interface.
|
||||
The @extref[Camel](github:akka-camel/src/main/scala/akka/camel/Camel.scala) interface in turn provides access to two important Apache Camel objects, the [CamelContext](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/CamelContext.java) and the `ProducerTemplate`.
|
||||
Below you can see how you can get access to these Apache Camel objects.
|
||||
|
||||
@@snip [CamelExtensionTest.java]($code$/java/jdocs/camel/CamelExtensionTest.java) { #CamelExtension }
|
||||
|
|
@ -80,7 +80,7 @@ Below you can see how you can get access to these Apache Camel objects.
|
|||
One `CamelExtension` is only loaded once for every one `ActorSystem`, which makes it safe to call the `CamelExtension` at any point in your code to get to the
|
||||
Apache Camel objects associated with it. There is one [CamelContext](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/CamelContext.java) and one `ProducerTemplate` for every one `ActorSystem` that uses a `CamelExtension`.
|
||||
By Default, a new [CamelContext](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/CamelContext.java) is created when the `CamelExtension` starts. If you want to inject your own context instead,
|
||||
you can implement the [ContextProvider](@github@/akka-camel/src/main/scala/akka/camel/ContextProvider.scala) interface and add the FQCN of your implementation in the config, as the value of the "akka.camel.context-provider".
|
||||
you can implement the @extref[ContextProvider](github:akka-camel/src/main/scala/akka/camel/ContextProvider.scala) interface and add the FQCN of your implementation in the config, as the value of the "akka.camel.context-provider".
|
||||
This interface define a single method `getContext()` used to load the [CamelContext](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/CamelContext.java).
|
||||
|
||||
Below an example on how to add the ActiveMQ component to the [CamelContext](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/CamelContext.java), which is required when you would like to use the ActiveMQ component.
|
||||
|
|
@ -98,7 +98,7 @@ Actors are created and started asynchronously. When a *Consumer* actor is create
|
|||
When a *Producer* actor is created, a [SendProcessor](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/processor/SendProcessor.java) and [Endpoint](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/Endpoint.java) are created so that the Producer can send messages to it.
|
||||
Publication is done asynchronously; setting up an endpoint may still be in progress after you have
|
||||
requested the actor to be created. Some Camel components can take a while to startup, and in some cases you might want to know when the endpoints are activated and ready to be used.
|
||||
The [Camel](@github@/akka-camel/src/main/scala/akka/camel/Camel.scala) interface allows you to find out when the endpoint is activated or deactivated.
|
||||
The @extref[Camel](github:akka-camel/src/main/scala/akka/camel/Camel.scala) interface allows you to find out when the endpoint is activated or deactivated.
|
||||
|
||||
@@snip [ActivationTestBase.java]($code$/java/jdocs/camel/ActivationTestBase.java) { #CamelActivation }
|
||||
|
||||
|
|
@ -112,9 +112,9 @@ A `DeActivationTimeoutException` is thrown if the associated camel objects could
|
|||
|
||||
## Consumer Actors
|
||||
|
||||
For objects to receive messages, they must inherit from the [UntypedConsumerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumer.scala)
|
||||
For objects to receive messages, they must inherit from the @extref[UntypedConsumerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumer.scala)
|
||||
class. For example, the following actor class (Consumer1) implements the
|
||||
*getEndpointUri* method, which is declared in the [UntypedConsumerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumer.scala) class, in order to receive
|
||||
*getEndpointUri* method, which is declared in the @extref[UntypedConsumerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedConsumer.scala) class, in order to receive
|
||||
messages from the `file:data/input/actor` Camel endpoint.
|
||||
|
||||
@@snip [Consumer1.java]($code$/java/jdocs/camel/Consumer1.java) { #Consumer1 }
|
||||
|
|
@ -168,7 +168,7 @@ way which is described in the documentation of the individual Camel
|
|||
components. Another option is to configure timeouts on the level of consumer actors.
|
||||
|
||||
Two-way communications between a Camel endpoint and an actor are
|
||||
initiated by sending the request message to the actor with the [ask](@github@/akka-actor/src/main/scala/akka/pattern/Patterns.scala) pattern
|
||||
initiated by sending the request message to the actor with the @extref[ask](github:akka-actor/src/main/scala/akka/pattern/Patterns.scala) pattern
|
||||
and the actor replies to the endpoint when the response is ready. The ask request to the actor can timeout, which will
|
||||
result in the [Exchange](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/Exchange.java) failing with a TimeoutException set on the failure of the [Exchange](https://svn.apache.org/repos/asf/camel/tags/camel-2.8.0/camel-core/src/main/java/org/apache/camel/Exchange.java).
|
||||
The timeout on the consumer actor can be overridden with the `replyTimeout`, as shown below.
|
||||
|
|
@ -177,18 +177,18 @@ The timeout on the consumer actor can be overridden with the `replyTimeout`, as
|
|||
|
||||
## Producer Actors
|
||||
|
||||
For sending messages to Camel endpoints, actors need to inherit from the [UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) class and implement the getEndpointUri method.
|
||||
For sending messages to Camel endpoints, actors need to inherit from the @extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) class and implement the getEndpointUri method.
|
||||
|
||||
@@snip [Producer1.java]($code$/java/jdocs/camel/Producer1.java) { #Producer1 }
|
||||
|
||||
Producer1 inherits a default implementation of the onReceive method from the
|
||||
[UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) class. To customize a producer actor's default behavior you must override the [UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onTransformResponse and
|
||||
[UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onTransformOutgoingMessage methods. This is explained later in more detail.
|
||||
Producer Actors cannot override the [UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onReceive method.
|
||||
@extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) class. To customize a producer actor's default behavior you must override the @extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onTransformResponse and
|
||||
@extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onTransformOutgoingMessage methods. This is explained later in more detail.
|
||||
Producer Actors cannot override the @extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onReceive method.
|
||||
|
||||
Any message sent to a Producer actor will be sent to
|
||||
the associated Camel endpoint, in the above example to
|
||||
`http://localhost:8080/news`. The [UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) always sends messages asynchronously. Response messages (if supported by the
|
||||
`http://localhost:8080/news`. The @extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) always sends messages asynchronously. Response messages (if supported by the
|
||||
configured endpoint) will, by default, be returned to the original sender. The
|
||||
following example uses the ask pattern to send a message to a
|
||||
Producer actor and waits for a response.
|
||||
|
|
@ -212,7 +212,7 @@ sender.
|
|||
@@snip [OnRouteResponseTestBase.java]($code$/java/jdocs/camel/OnRouteResponseTestBase.java) { #RouteResponse }
|
||||
|
||||
Before producing messages to endpoints, producer actors can pre-process them by
|
||||
overriding the [UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onTransformOutgoingMessage method.
|
||||
overriding the @extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala).onTransformOutgoingMessage method.
|
||||
|
||||
@@snip [Transformer.java]($code$/java/jdocs/camel/Transformer.java) { #TransformOutgoingMessage }
|
||||
|
||||
|
|
@ -234,7 +234,7 @@ To correlate request with response messages, applications can set the
|
|||
|
||||
### ProducerTemplate
|
||||
|
||||
The [UntypedProducerActor](@github@/akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) class is a very convenient way for actors to produce messages to Camel endpoints.
|
||||
The @extref[UntypedProducerActor](github:akka-camel/src/main/scala/akka/camel/javaapi/UntypedProducerActor.scala) class is a very convenient way for actors to produce messages to Camel endpoints.
|
||||
Actors may also use a Camel `ProducerTemplate` for producing messages to endpoints.
|
||||
|
||||
@@snip [MyActor.java]($code$/java/jdocs/camel/MyActor.java) { #ProducerTemplate }
|
||||
|
|
@ -387,7 +387,7 @@ akka-camel may make some further modifications to it.
|
|||
<a id="camel-examples"></a>
|
||||
## Examples
|
||||
|
||||
The sample named [Akka Camel Samples with Java](@exampleCodeService@/akka-samples-camel-java) ([source code](@samples@/akka-sample-camel-java))
|
||||
The sample named @extref[Akka Camel Samples with Java](ecs:akka-samples-camel-java) (@extref[source code](samples:akka-sample-camel-java))
|
||||
contains 3 samples:
|
||||
|
||||
>
|
||||
|
|
|
|||
|
|
@ -139,21 +139,23 @@ Similarly we can have an actor that behaves in a similar fashion for learning wh
|
|||
|
||||
To use the Cluster Client you must add the following dependency in your project.
|
||||
|
||||
sbt:
|
||||
sbt
|
||||
: @@@vars
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-tools" % $akka.version$
|
||||
```
|
||||
@@@
|
||||
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-tools" % "@version@" @crossString@
|
||||
```
|
||||
|
||||
maven:
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-tools_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
```
|
||||
Maven
|
||||
: @@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-tools_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
<a id="cluster-client-config"></a>
|
||||
## Configuration
|
||||
|
|
|
|||
|
|
@ -14,13 +14,15 @@ Cluster Metrics Extension is a separate Akka module delivered in `akka-cluster-m
|
|||
To enable usage of the extension you need to add the following dependency to your project:
|
||||
:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-metrics_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
<artifactId>akka-cluster-metrics_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
and add the following configuration stanza to your `application.conf`
|
||||
:
|
||||
|
|
@ -98,13 +100,15 @@ unique per instance directory. You can control the extract directory with the
|
|||
To enable usage of Sigar you can add the following dependency to the user project
|
||||
:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>io.kamon</groupId>
|
||||
<artifactId>sigar-loader</artifactId>
|
||||
<version>@sigarLoaderVersion@</version>
|
||||
<version>$sigar_loader.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
You can download Kamon sigar-loader from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Csigar-loader)
|
||||
|
||||
|
|
@ -165,9 +169,9 @@ The same type of router could also have been defined in code:
|
|||
@@snip [FactorialFrontend.java]($code$/java/jdocs/cluster/FactorialFrontend.java) { #router-deploy-in-code }
|
||||
|
||||
The easiest way to run **Adaptive Load Balancing** example yourself is to download the ready to run
|
||||
[Akka Cluster Sample with Scala](@exampleCodeService@/akka-samples-cluster-java)
|
||||
@extref[Akka Cluster Sample with Scala](ecs:akka-samples-cluster-java)
|
||||
together with the tutorial. It contains instructions on how to run the **Adaptive Load Balancing** sample.
|
||||
The source code of this sample can be found in the [Akka Samples Repository](@samples@/akka-sample-cluster-java).
|
||||
The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-cluster-java).
|
||||
|
||||
## Subscribe to Metrics Events
|
||||
|
||||
|
|
|
|||
|
|
@ -373,21 +373,23 @@ different persistenceId.
|
|||
|
||||
To use the Cluster Sharding you must add the following dependency in your project.
|
||||
|
||||
sbt:
|
||||
sbt
|
||||
: @@@vars
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-sharding" % $akka.version$
|
||||
```
|
||||
@@@
|
||||
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-sharding" % "@version@" @crossString@
|
||||
```
|
||||
|
||||
maven:
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-sharding_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
```
|
||||
Maven
|
||||
: @@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-sharding_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
|||
|
|
@ -106,21 +106,24 @@ A more comprehensive sample is available in the tutorial named [Distributed work
|
|||
|
||||
To use the Cluster Singleton you must add the following dependency in your project.
|
||||
|
||||
sbt:
|
||||
sbt
|
||||
: @@@vars
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-tools" % $akka.version$
|
||||
```
|
||||
@@@
|
||||
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-tools" % "@version@" @crossString@
|
||||
```
|
||||
Maven
|
||||
: @@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-tools_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
maven:
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-tools_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
|||
|
|
@ -6,13 +6,15 @@ For introduction to the Akka Cluster concepts please see @ref:[Cluster Specifica
|
|||
|
||||
The Akka cluster is a separate jar file. Make sure that you have the following dependency in your project:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
<artifactId>akka-cluster_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
<a id="cluster-simple-example"></a>
|
||||
## A Simple Cluster Example
|
||||
|
|
@ -82,9 +84,9 @@ The actor registers itself as subscriber of certain cluster events. It receives
|
|||
of the cluster when the subscription starts and then it receives events for changes that happen in the cluster.
|
||||
|
||||
The easiest way to run this example yourself is to download the ready to run
|
||||
[Akka Cluster Sample with Scala](@exampleCodeService@/akka-samples-cluster-java)
|
||||
@extref[Akka Cluster Sample with Scala](ecs:akka-samples-cluster-java)
|
||||
together with the tutorial. It contains instructions on how to run the `SimpleClusterApp`.
|
||||
The source code of this sample can be found in the [Akka Samples Repository](@samples@/akka-sample-cluster-java).
|
||||
The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-cluster-java).
|
||||
|
||||
## Joining to Seed Nodes
|
||||
|
||||
|
|
@ -739,7 +741,7 @@ or similar instead.
|
|||
|
||||
@@@
|
||||
|
||||
The cluster can be managed with the script `akka-cluster` provided in the Akka github repository here: [@github@/akka-cluster/jmx-client](@github@/akka-cluster/jmx-client). Place the script and the `jmxsh-R5.jar` library in the same directory.
|
||||
The cluster can be managed with the script `akka-cluster` provided in the Akka github repository @extref[here](github:akka-cluster/jmx-client). Place the script and the `jmxsh-R5.jar` library in the same directory.
|
||||
|
||||
Run it without parameters to see instructions about how to use the script:
|
||||
|
||||
|
|
|
|||
|
|
@ -579,7 +579,7 @@ API documentation of the `Replicator` for details.
|
|||
## Samples
|
||||
|
||||
Several interesting samples are included and described in the
|
||||
tutorial named [Akka Distributed Data Samples with Java](@exampleCodeService@/akka-samples-distributed-data-java) ([source code](@samples@/akka-sample-distributed-data-java))
|
||||
tutorial named @extref[Akka Distributed Data Samples with Java](ecs:akka-samples-distributed-data-java) (@extref[source code](samples:akka-sample-distributed-data-java))
|
||||
|
||||
* Low Latency Voting Service
|
||||
* Highly Available Shopping Cart
|
||||
|
|
@ -624,21 +624,23 @@ paper by Mark Shapiro et. al.
|
|||
|
||||
To use Distributed Data you must add the following dependency in your project.
|
||||
|
||||
sbt:
|
||||
sbt
|
||||
: @@@vars
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-distributed-data" % $akka.version$
|
||||
```
|
||||
@@@
|
||||
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-distributed-data" % "@version@" @crossString@
|
||||
```
|
||||
|
||||
maven:
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-distributed-data_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
```
|
||||
Maven
|
||||
: @@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-distributed-data_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
## Configuration
|
||||
|
||||
|
|
|
|||
|
|
@ -183,18 +183,20 @@ If you are looking for at-least-once delivery guarantee, we recommend [Kafka Akk
|
|||
|
||||
To use Distributed Publish Subscribe you must add the following dependency in your project.
|
||||
|
||||
sbt:
|
||||
sbt
|
||||
: @@@vars
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-tools" % $akka.version$
|
||||
```
|
||||
@@@
|
||||
|
||||
```
|
||||
"com.typesafe.akka" %% "akka-cluster-tools" % "@version@" @crossString@
|
||||
```
|
||||
|
||||
maven:
|
||||
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-tools_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
</dependency>
|
||||
```
|
||||
Maven
|
||||
: @@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-cluster-tools_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
|
@ -32,7 +32,7 @@ for any concrete implementation.
|
|||
|
||||
The classifiers presented here are part of the Akka distribution, but rolling
|
||||
your own in case you do not find a perfect match is not difficult, check the
|
||||
implementation of the existing ones on [github](@github@/akka-actor/src/main/scala/akka/event/EventBus.scala)
|
||||
implementation of the existing ones on @extref[github](github:akka-actor/src/main/scala/akka/event/EventBus.scala)
|
||||
|
||||
### Lookup Classification
|
||||
|
||||
|
|
|
|||
|
|
@ -432,6 +432,6 @@ zero.
|
|||
## Examples
|
||||
|
||||
A bigger FSM example contrasted with Actor's `become`/`unbecome` can be
|
||||
downloaded as a ready to run [Akka FSM sample](@exampleCodeService@/akka-samples-fsm-java)
|
||||
downloaded as a ready to run @extref[Akka FSM sample](ecs:akka-samples-fsm-java)
|
||||
together with a tutorial. The source code of this sample can be found in the
|
||||
[Akka Samples Repository](@samples@/akka-sample-fsm-java).
|
||||
@extref[Akka Samples Repository](samples:akka-sample-fsm-java).
|
||||
|
|
@ -180,7 +180,7 @@ to the network socket.
|
|||
|
||||
These write models (with the exception of the second which is rather specialised) are
|
||||
demonstrated in complete examples below. The full and contiguous source is
|
||||
available [on GitHub](@github@/akka-docs/rst/java/code/jdocs/io/japi).
|
||||
available @extref[on GitHub](github:akka-docs/rst/java/code/jdocs/io/japi).
|
||||
|
||||
For back-pressuring reads there are two modes of operation
|
||||
|
||||
|
|
|
|||
|
|
@ -8,13 +8,15 @@ Note that implementations for other journals may have different semantics.
|
|||
Akka persistence LevelDB query implementation is bundled in the `akka-persistence-query` artifact.
|
||||
Make sure that you have the following dependency in your project:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-persistence-query_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
<artifactId>akka-persistence-query_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
## How to get the ReadJournal
|
||||
|
||||
|
|
|
|||
|
|
@ -14,13 +14,15 @@ recommend (in the spirit of CQRS) of splitting up the write/read sides into sepa
|
|||
|
||||
Akka persistence query is a separate jar file. Make sure that you have the following dependency in your project:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-persistence-query_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
<artifactId>akka-persistence-query_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
## Design overview
|
||||
|
||||
|
|
|
|||
|
|
@ -13,13 +13,15 @@ communication with at-least-once message delivery semantics.
|
|||
|
||||
Akka persistence is a separate jar file. Make sure that you have the following dependency in your project:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-persistence_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
<artifactId>akka-persistence_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
The Akka persistence extension comes with few built-in persistence plugins, including
|
||||
in-memory heap based journal, local file-system based snapshot-store and LevelDB based journal.
|
||||
|
|
@ -104,9 +106,9 @@ stored, e.g. due to serialization error, `onPersistRejected` will be invoked (lo
|
|||
by default), and the actor continues with next message.
|
||||
|
||||
The easiest way to run this example yourself is to download the ready to run
|
||||
[Akka Persistence Sample with Scala](@exampleCodeService@/akka-samples-persistence-java)
|
||||
@extref[Akka Persistence Sample with Scala](ecs:akka-samples-persistence-java)
|
||||
together with the tutorial. It contains instructions on how to run the `PersistentActorExample`.
|
||||
The source code of this sample can be found in the [Akka Samples Repository](@samples@/akka-sample-persistence-java).
|
||||
The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-persistence-java).
|
||||
|
||||
@@@ note
|
||||
|
||||
|
|
@ -897,7 +899,7 @@ The TCK is usable from Java as well as Scala projects. For Java you need to incl
|
|||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-persistence-tck_${scala.version}</artifactId>
|
||||
<version>@version@</version>
|
||||
<version>$akka.version$</version>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
```
|
||||
|
|
|
|||
|
|
@ -45,13 +45,15 @@ are also different.
|
|||
|
||||
The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-remote_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
<artifactId>akka-remote_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
To enable remote capabilities in your Akka project you should, at a minimum, add the following changes
|
||||
to your `application.conf` file:
|
||||
|
|
@ -569,9 +571,9 @@ That is not done by the router.
|
|||
<a id="remote-sample-java-artery"></a>
|
||||
## Remoting Sample
|
||||
|
||||
You can download a ready to run [remoting sample](@exampleCodeService@/akka-samples-remote-java)
|
||||
You can download a ready to run @extref[remoting sample](ecs:akka-samples-remote-java)
|
||||
together with a tutorial for a more hands-on experience. The source code of this sample can be found in the
|
||||
[Akka Samples Repository](@samples@/akka-sample-remote-java).
|
||||
@extref[Akka Samples Repository](samples:akka-sample-remote-java).
|
||||
|
||||
## Performance tuning
|
||||
|
||||
|
|
@ -717,7 +719,7 @@ the system might have less latency than at low message rates.
|
|||
|
||||
@@@ note
|
||||
|
||||
In this version (@version@) the flight-recorder is disabled by default because there is no automatic
|
||||
In this version ($akka.version$) the flight-recorder is disabled by default because there is no automatic
|
||||
file name and path calculation implemented to make it possible to reuse the same file for every restart of
|
||||
the same actor system without clashing with files produced by other systems (possibly running on the same machine).
|
||||
Currently, you have to set the path and file names yourself to avoid creating an unbounded number
|
||||
|
|
|
|||
|
|
@ -17,13 +17,15 @@ network and/or Akka configuration will have to be changed as described in
|
|||
|
||||
The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project:
|
||||
|
||||
@@@vars
|
||||
```
|
||||
<dependency>
|
||||
<groupId>com.typesafe.akka</groupId>
|
||||
<artifactId>akka-remote_@binVersion@</artifactId>
|
||||
<version>@version@</version>
|
||||
<artifactId>akka-remote_$scala.binary_version$</artifactId>
|
||||
<version>$akka.version$</version>
|
||||
</dependency>
|
||||
```
|
||||
@@@
|
||||
|
||||
To enable remote capabilities in your Akka project you should, at a minimum, add the following changes
|
||||
to your `application.conf` file:
|
||||
|
|
@ -368,9 +370,9 @@ That is not done by the router.
|
|||
<a id="remote-sample"></a>
|
||||
## Remoting Sample
|
||||
|
||||
You can download a ready to run [remoting sample](@exampleCodeService@/akka-samples-remote-java)
|
||||
You can download a ready to run @extref[remoting sample](ecs:akka-samples-remote-java)
|
||||
together with a tutorial for a more hands-on experience. The source code of this sample can be found in the
|
||||
[Akka Samples Repository](@samples@/akka-sample-remote-java).
|
||||
@extref[Akka Samples Repository](samples:akka-sample-remote-java).
|
||||
|
||||
### Remote Events
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue