From 0e7a8e1e6165cf7df532482bc03a2451466e6f7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martynas=20Mickevi=C4=8Dius?= Date: Fri, 12 May 2017 16:07:51 +0300 Subject: [PATCH] #22909 Fix parameters * @binVersion@ * @github@ * @samples@ * @exampleCodeService@ --- akka-docs/build.sbt | 5 +++ akka-docs/src/main/paradox/java/camel.md | 30 ++++++++-------- .../src/main/paradox/java/cluster-client.md | 30 ++++++++-------- .../src/main/paradox/java/cluster-metrics.md | 14 +++++--- .../src/main/paradox/java/cluster-sharding.md | 30 ++++++++-------- .../main/paradox/java/cluster-singleton.md | 29 +++++++++------- .../src/main/paradox/java/cluster-usage.md | 12 ++++--- .../src/main/paradox/java/distributed-data.md | 32 +++++++++-------- .../main/paradox/java/distributed-pub-sub.md | 30 ++++++++-------- akka-docs/src/main/paradox/java/event-bus.md | 2 +- akka-docs/src/main/paradox/java/fsm.md | 4 +-- akka-docs/src/main/paradox/java/io-tcp.md | 2 +- .../paradox/java/persistence-query-leveldb.md | 6 ++-- .../main/paradox/java/persistence-query.md | 6 ++-- .../src/main/paradox/java/persistence.md | 12 ++++--- .../src/main/paradox/java/remoting-artery.md | 12 ++++--- akka-docs/src/main/paradox/java/remoting.md | 10 +++--- akka-docs/src/main/paradox/scala/actors.md | 2 +- .../src/main/paradox/scala/additional/osgi.md | 10 +++--- akka-docs/src/main/paradox/scala/camel.md | 34 +++++++++---------- .../src/main/paradox/scala/cluster-client.md | 30 ++++++++-------- .../src/main/paradox/scala/cluster-metrics.md | 12 ++++--- .../main/paradox/scala/cluster-sharding.md | 30 ++++++++-------- .../main/paradox/scala/cluster-singleton.md | 30 ++++++++-------- .../src/main/paradox/scala/cluster-usage.md | 22 ++++++------ .../main/paradox/scala/distributed-data.md | 34 ++++++++++--------- .../main/paradox/scala/distributed-pub-sub.md | 30 ++++++++-------- akka-docs/src/main/paradox/scala/event-bus.md | 2 +- akka-docs/src/main/paradox/scala/fsm.md | 4 +-- akka-docs/src/main/paradox/scala/io-tcp.md | 2 +- .../main/paradox/scala/multi-jvm-testing.md | 2 +- .../main/paradox/scala/multi-node-testing.md | 11 +++--- .../scala/persistence-query-leveldb.md | 4 ++- .../main/paradox/scala/persistence-query.md | 4 ++- .../src/main/paradox/scala/persistence.md | 10 +++--- .../main/paradox/scala/project/licenses.md | 2 +- .../src/main/paradox/scala/project/links.md | 13 ++++--- .../src/main/paradox/scala/remoting-artery.md | 10 +++--- akka-docs/src/main/paradox/scala/remoting.md | 8 +++-- project/Dependencies.scala | 1 + 40 files changed, 320 insertions(+), 253 deletions(-) diff --git a/akka-docs/build.sbt b/akka-docs/build.sbt index 7f61f20749..3ad5ea5d0b 100644 --- a/akka-docs/build.sbt +++ b/akka-docs/build.sbt @@ -17,8 +17,13 @@ enablePlugins(AkkaParadoxPlugin) paradoxProperties ++= Map( "extref.wikipedia.base_url" -> "https://en.wikipedia.org/wiki/%s", + "extref.github.base_url" -> ("http://github.com/akka/akka/tree/" + (if (isSnapshot.value) "master" else "v" + version.value) + "/%s"), + "extref.samples.base_url" -> "http://github.com/akka/akka-samples/tree/master/%s", + "extref.ecs.base_url" -> "https://example.lightbend.com/v1/download/%s", "scala.version" -> scalaVersion.value, + "scala.binary_version" -> scalaBinaryVersion.value, "akka.version" -> version.value, + "sigar_loader.version" -> "1.6.6-rev002", "snip.code.base_dir" -> (sourceDirectory in Test).value.getAbsolutePath, "snip.akka.base_dir" -> ((baseDirectory in Test).value / "..").getAbsolutePath ) diff --git a/akka-docs/src/main/paradox/java/camel.md b/akka-docs/src/main/paradox/java/camel.md index 76f0f9c315..78ac42b9b9 100644 --- a/akka-docs/src/main/paradox/java/camel.md +++ b/akka-docs/src/main/paradox/java/camel.md @@ -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. ## 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: > diff --git a/akka-docs/src/main/paradox/java/cluster-client.md b/akka-docs/src/main/paradox/java/cluster-client.md index 29b4cdc8dd..fde0e0ead0 100644 --- a/akka-docs/src/main/paradox/java/cluster-client.md +++ b/akka-docs/src/main/paradox/java/cluster-client.md @@ -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: - -``` - - com.typesafe.akka - akka-cluster-tools_@binVersion@ - @version@ - -``` +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-cluster-tools_$scala.binary_version$ + $akka.version$ + + ``` + @@@ ## Configuration diff --git a/akka-docs/src/main/paradox/java/cluster-metrics.md b/akka-docs/src/main/paradox/java/cluster-metrics.md index cf7d2aa091..11641f8972 100644 --- a/akka-docs/src/main/paradox/java/cluster-metrics.md +++ b/akka-docs/src/main/paradox/java/cluster-metrics.md @@ -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 ``` com.typesafe.akka - akka-cluster-metrics_@binVersion@ - @version@ + akka-cluster-metrics_$scala.binary_version$ + $akka.version$ ``` +@@@ 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 ``` io.kamon sigar-loader - @sigarLoaderVersion@ + $sigar_loader.version$ ``` +@@@ 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 diff --git a/akka-docs/src/main/paradox/java/cluster-sharding.md b/akka-docs/src/main/paradox/java/cluster-sharding.md index ede4fab916..28f7575aca 100644 --- a/akka-docs/src/main/paradox/java/cluster-sharding.md +++ b/akka-docs/src/main/paradox/java/cluster-sharding.md @@ -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: - -``` - - com.typesafe.akka - akka-cluster-sharding_@binVersion@ - @version@ - -``` +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-cluster-sharding_$scala.binary_version$ + $akka.version$ + + ``` + @@@ ## Configuration diff --git a/akka-docs/src/main/paradox/java/cluster-singleton.md b/akka-docs/src/main/paradox/java/cluster-singleton.md index 9d026771b6..185718aca7 100644 --- a/akka-docs/src/main/paradox/java/cluster-singleton.md +++ b/akka-docs/src/main/paradox/java/cluster-singleton.md @@ -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 + ``` + + com.typesafe.akka + akka-cluster-tools_$scala.binary_version$ + $akka.version$ + + ``` + @@@ -maven: - -``` - - com.typesafe.akka - akka-cluster-tools_@binVersion@ - @version@ - -``` ## Configuration diff --git a/akka-docs/src/main/paradox/java/cluster-usage.md b/akka-docs/src/main/paradox/java/cluster-usage.md index 6e1a93f169..51cd44e843 100644 --- a/akka-docs/src/main/paradox/java/cluster-usage.md +++ b/akka-docs/src/main/paradox/java/cluster-usage.md @@ -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 ``` com.typesafe.akka - akka-cluster_@binVersion@ - @version@ + akka-cluster_$scala.binary_version$ + $akka.version$ ``` +@@@ ## 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: diff --git a/akka-docs/src/main/paradox/java/distributed-data.md b/akka-docs/src/main/paradox/java/distributed-data.md index 790142361a..a2bb9cedd9 100644 --- a/akka-docs/src/main/paradox/java/distributed-data.md +++ b/akka-docs/src/main/paradox/java/distributed-data.md @@ -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: - -``` - - com.typesafe.akka - akka-distributed-data_@binVersion@ - @version@ - -``` +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-distributed-data_$scala.binary_version$ + $akka.version$ + + ``` + @@@ ## Configuration diff --git a/akka-docs/src/main/paradox/java/distributed-pub-sub.md b/akka-docs/src/main/paradox/java/distributed-pub-sub.md index 3922dd1090..2232a4b642 100644 --- a/akka-docs/src/main/paradox/java/distributed-pub-sub.md +++ b/akka-docs/src/main/paradox/java/distributed-pub-sub.md @@ -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: - -``` - - com.typesafe.akka - akka-cluster-tools_@binVersion@ - @version@ - -``` \ No newline at end of file +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-cluster-tools_$scala.binary_version$ + $akka.version$ + + ``` + @@@ \ No newline at end of file diff --git a/akka-docs/src/main/paradox/java/event-bus.md b/akka-docs/src/main/paradox/java/event-bus.md index 4389e77a16..605066bf09 100644 --- a/akka-docs/src/main/paradox/java/event-bus.md +++ b/akka-docs/src/main/paradox/java/event-bus.md @@ -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 diff --git a/akka-docs/src/main/paradox/java/fsm.md b/akka-docs/src/main/paradox/java/fsm.md index 1b8e30ebc0..0c16ca0a0f 100644 --- a/akka-docs/src/main/paradox/java/fsm.md +++ b/akka-docs/src/main/paradox/java/fsm.md @@ -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). \ No newline at end of file +@extref[Akka Samples Repository](samples:akka-sample-fsm-java). \ No newline at end of file diff --git a/akka-docs/src/main/paradox/java/io-tcp.md b/akka-docs/src/main/paradox/java/io-tcp.md index 7c6eaf39b9..cd2fa3318e 100644 --- a/akka-docs/src/main/paradox/java/io-tcp.md +++ b/akka-docs/src/main/paradox/java/io-tcp.md @@ -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 diff --git a/akka-docs/src/main/paradox/java/persistence-query-leveldb.md b/akka-docs/src/main/paradox/java/persistence-query-leveldb.md index 4b9b617164..e0c32affe8 100644 --- a/akka-docs/src/main/paradox/java/persistence-query-leveldb.md +++ b/akka-docs/src/main/paradox/java/persistence-query-leveldb.md @@ -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 ``` com.typesafe.akka - akka-persistence-query_@binVersion@ - @version@ + akka-persistence-query_$scala.binary_version$ + $akka.version$ ``` +@@@ ## How to get the ReadJournal diff --git a/akka-docs/src/main/paradox/java/persistence-query.md b/akka-docs/src/main/paradox/java/persistence-query.md index 212e6068c8..7211cebe2d 100644 --- a/akka-docs/src/main/paradox/java/persistence-query.md +++ b/akka-docs/src/main/paradox/java/persistence-query.md @@ -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 ``` com.typesafe.akka - akka-persistence-query_@binVersion@ - @version@ + akka-persistence-query_$scala.binary_version$ + $akka.version$ ``` +@@@ ## Design overview diff --git a/akka-docs/src/main/paradox/java/persistence.md b/akka-docs/src/main/paradox/java/persistence.md index 4588af6d43..8aee5c449f 100644 --- a/akka-docs/src/main/paradox/java/persistence.md +++ b/akka-docs/src/main/paradox/java/persistence.md @@ -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 ``` com.typesafe.akka - akka-persistence_@binVersion@ - @version@ + akka-persistence_$scala.binary_version$ + $akka.version$ ``` +@@@ 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 com.typesafe.akka akka-persistence-tck_${scala.version} - @version@ + $akka.version$ test ``` diff --git a/akka-docs/src/main/paradox/java/remoting-artery.md b/akka-docs/src/main/paradox/java/remoting-artery.md index fb10b280c3..c576b0b44e 100644 --- a/akka-docs/src/main/paradox/java/remoting-artery.md +++ b/akka-docs/src/main/paradox/java/remoting-artery.md @@ -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 ``` com.typesafe.akka - akka-remote_@binVersion@ - @version@ + akka-remote_$scala.binary_version$ + $akka.version$ ``` +@@@ 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. ## 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 diff --git a/akka-docs/src/main/paradox/java/remoting.md b/akka-docs/src/main/paradox/java/remoting.md index 3181ff2180..8a4c6f9dc4 100644 --- a/akka-docs/src/main/paradox/java/remoting.md +++ b/akka-docs/src/main/paradox/java/remoting.md @@ -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 ``` com.typesafe.akka - akka-remote_@binVersion@ - @version@ + akka-remote_$scala.binary_version$ + $akka.version$ ``` +@@@ 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. ## 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 diff --git a/akka-docs/src/main/paradox/scala/actors.md b/akka-docs/src/main/paradox/scala/actors.md index c02409bc6a..b65a3cbb5c 100644 --- a/akka-docs/src/main/paradox/scala/actors.md +++ b/akka-docs/src/main/paradox/scala/actors.md @@ -867,7 +867,7 @@ behavior is not the default). ### Encoding Scala Actors nested receives without accidentally leaking memory -See this [Unnested receive example](@github@/akka-docs/rst/scala/code/docs/actor/UnnestedReceives.scala). +See this @extref[Unnested receive example](github:akka-docs/src/main/scala/docs/actor/UnnestedReceives.scala). ## Stash diff --git a/akka-docs/src/main/paradox/scala/additional/osgi.md b/akka-docs/src/main/paradox/scala/additional/osgi.md index d9a4827d86..2aeaf85aa7 100644 --- a/akka-docs/src/main/paradox/scala/additional/osgi.md +++ b/akka-docs/src/main/paradox/scala/additional/osgi.md @@ -70,7 +70,7 @@ in an application composed of multiple JARs to reside under a single package nam might scan all classes from `com.example.plugins` for specific service implementations with that package existing in several contributed JARs. While it is possible to support overlapping packages with complex manifest headers, it's much better to use non-overlapping -package spaces and facilities such as [Akka Cluster](@github@/akka-docs/rst/scala/code/docs/akka/current/common/cluster.html) +package spaces and facilities such as @extref[Akka Cluster](github:akka-docs/rst/scala/code/docs/akka/current/common/cluster.html) for service discovery. Stylistically, many organizations opt to use the root package path as the name of the bundle distribution file. @@ -104,14 +104,16 @@ from the application bundle and all transitive dependencies. The `ActorSystemActivator` class is included in the `akka-osgi` artifact: +@@@vars ``` com.typesafe.akka - akka-osgi_@binVersion@ - @version@ + akka-osgi_$scala.binary_version$ + $akka.version$ ``` +@@@ ## Sample -A complete sample project is provided in [akka-sample-osgi-dining-hakkers](@samples@/tree/master/akka-sample-osgi-dining-hakkers) \ No newline at end of file +A complete sample project is provided in @extref[akka-sample-osgi-dining-hakkers](samples:akka-sample-osgi-dining-hakkers) \ No newline at end of file diff --git a/akka-docs/src/main/paradox/scala/camel.md b/akka-docs/src/main/paradox/scala/camel.md index 13a6867317..69e68dc24f 100644 --- a/akka-docs/src/main/paradox/scala/camel.md +++ b/akka-docs/src/main/paradox/scala/camel.md @@ -69,8 +69,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) trait. -The [Camel](@github@/akka-camel/src/main/scala/akka/camel/Camel.scala) trait 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) trait. +The @extref[Camel](github:akka-camel/src/main/scala/akka/camel/Camel.scala) trait 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 [Introduction.scala]($code$/scala/docs/camel/Introduction.scala) { #CamelExtension } @@ -78,7 +78,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 extend the [ContextProvider](@github@/akka-camel/src/main/scala/akka/camel/ContextProvider.scala) trait and add the FQCN of your implementation in the config, as the value of the "akka.camel.context-provider". +you can extend the @extref[ContextProvider](github:akka-camel/src/main/scala/akka/camel/ContextProvider.scala) trait 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. @@ -94,7 +94,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) trait 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) trait allows you to find out when the endpoint is activated or deactivated. @@snip [Introduction.scala]($code$/scala/docs/camel/Introduction.scala) { #CamelActivation } @@ -108,7 +108,7 @@ A `DeActivationTimeoutException` is thrown if the associated camel objects could ## Consumer Actors -For objects to receive messages, they must mixin the [Consumer](@github@/akka-camel/src/main/scala/akka/camel/Consumer.scala) +For objects to receive messages, they must mixin the @extref[Consumer](github:akka-camel/src/main/scala/akka/camel/Consumer.scala) trait. For example, the following actor class (Consumer1) implements the endpointUri method, which is declared in the Consumer trait, in order to receive messages from the `file:data/input/actor` Camel endpoint. @@ -118,7 +118,7 @@ messages from the `file:data/input/actor` Camel endpoint. Whenever a file is put into the data/input/actor directory, its content is picked up by the Camel [file component](http://camel.apache.org/file2.html) and sent as message to the actor. Messages consumed by actors from Camel endpoints are of type -[CamelMessage](@github@/akka-camel/src/main/scala/akka/camel/CamelMessage.scala). These are immutable representations of Camel messages. +@extref[CamelMessage](github:akka-camel/src/main/scala/akka/camel/CamelMessage.scala). These are immutable representations of Camel messages. Here's another example that sets the endpointUri to `jetty:http://localhost:8877/camel/default`. It causes Camel's Jetty @@ -130,7 +130,7 @@ from localhost on port 8877. After starting the actor, clients can send messages to that actor by POSTing to `http://localhost:8877/camel/default`. The actor sends a response by using the sender *!* method. For returning a message body and headers to the HTTP -client the response type should be [CamelMessage](@github@/akka-camel/src/main/scala/akka/camel/CamelMessage.scala). For any other response type, a +client the response type should be @extref[CamelMessage](github:akka-camel/src/main/scala/akka/camel/CamelMessage.scala). For any other response type, a new CamelMessage object is created by akka-camel with the actor response as message body. @@ -164,7 +164,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/AskSupport.scala) pattern +initiated by sending the request message to the actor with the @extref[ask](github:akka-actor/src/main/scala/akka/pattern/AskSupport.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. @@ -173,18 +173,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 mixin the [Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala) trait and implement the endpointUri method. +For sending messages to Camel endpoints, actors need to mixin the @extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.scala) trait and implement the endpointUri method. @@snip [Producers.scala]($code$/scala/docs/camel/Producers.scala) { #Producer1 } Producer1 inherits a default implementation of the receive method from the -Producer trait. To customize a producer actor's default behavior you must override the [Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala).transformResponse and -[Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala).transformOutgoingMessage methods. This is explained later in more detail. -Producer Actors cannot override the default [Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala).receive method. +Producer trait. To customize a producer actor's default behavior you must override the @extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.scala).transformResponse and +@extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.scala).transformOutgoingMessage methods. This is explained later in more detail. +Producer Actors cannot override the default @extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.scala).receive method. -Any message sent to a [Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala) actor will be sent to +Any message sent to a @extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.scala) actor will be sent to the associated Camel endpoint, in the above example to -`http://localhost:8080/news`. The [Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala) always sends messages asynchronously. Response messages (if supported by the +`http://localhost:8080/news`. The @extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.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. @@ -204,7 +204,7 @@ sender. @@snip [Producers.scala]($code$/scala/docs/camel/Producers.scala) { #RouteResponse } Before producing messages to endpoints, producer actors can pre-process them by -overriding the [Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala).transformOutgoingMessage method. +overriding the @extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.scala).transformOutgoingMessage method. @@snip [Producers.scala]($code$/scala/docs/camel/Producers.scala) { #TransformOutgoingMessage } @@ -226,7 +226,7 @@ To correlate request with response messages, applications can set the ### ProducerTemplate -The [Producer](@github@/akka-camel/src/main/scala/akka/camel/Producer.scala) trait is a very +The @extref[Producer](github:akka-camel/src/main/scala/akka/camel/Producer.scala) trait 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. @@ -377,7 +377,7 @@ akka-camel may make some further modifications to it. ## Examples -The sample named [Akka Camel Samples with Scala](@exampleCodeService@/akka-samples-camel-scala) ([source code](@samples@/akka-sample-camel-scala)) +The sample named @extref[Akka Camel Samples with Scala](ecs:akka-samples-camel-scala) (@extref[source code](samples:akka-sample-camel-scala)) contains 3 samples: > diff --git a/akka-docs/src/main/paradox/scala/cluster-client.md b/akka-docs/src/main/paradox/scala/cluster-client.md index 70733fd0fe..f6acafefad 100644 --- a/akka-docs/src/main/paradox/scala/cluster-client.md +++ b/akka-docs/src/main/paradox/scala/cluster-client.md @@ -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: - -``` - - com.typesafe.akka - akka-cluster-tools_@binVersion@ - @version@ - -``` +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-cluster-tools_$scala.binary_version$ + $akka.version$ + + ``` + @@@ ## Configuration diff --git a/akka-docs/src/main/paradox/scala/cluster-metrics.md b/akka-docs/src/main/paradox/scala/cluster-metrics.md index 54b7554027..62d6d0a3f6 100644 --- a/akka-docs/src/main/paradox/scala/cluster-metrics.md +++ b/akka-docs/src/main/paradox/scala/cluster-metrics.md @@ -14,9 +14,11 @@ 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 ``` -"com.typesafe.akka" % "akka-cluster-metrics_@binVersion@" % "@version@" +"com.typesafe.akka" % "akka-cluster-metrics_$scala.binary_version$" % "$akka.version$" ``` +@@@ and add the following configuration stanza to your `application.conf` : @@ -94,9 +96,11 @@ 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 ``` -"io.kamon" % "sigar-loader" % "@sigarLoaderVersion@" +"io.kamon" % "sigar-loader" % "$sigar_loader.version$" ``` +@@@ You can download Kamon sigar-loader from [Maven Central](http://search.maven.org/#search%7Cga%7C1%7Csigar-loader) @@ -157,9 +161,9 @@ The same type of router could also have been defined in code: @@snip [FactorialFrontend.scala]($code$/scala/docs/cluster/FactorialFrontend.scala) { #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-scala) +@extref[Akka Cluster Sample with Scala](ecs:akka-samples-cluster-scala) 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-scala). +The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-cluster-scala). ## Subscribe to Metrics Events diff --git a/akka-docs/src/main/paradox/scala/cluster-sharding.md b/akka-docs/src/main/paradox/scala/cluster-sharding.md index e4b19bc4e2..99cfbf72ae 100644 --- a/akka-docs/src/main/paradox/scala/cluster-sharding.md +++ b/akka-docs/src/main/paradox/scala/cluster-sharding.md @@ -375,21 +375,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: - -``` - - com.typesafe.akka - akka-cluster-sharding_@binVersion@ - @version@ - -``` +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-cluster-sharding_$scala.binary_version$ + $akka.version$ + + ``` + @@@ ## Configuration diff --git a/akka-docs/src/main/paradox/scala/cluster-singleton.md b/akka-docs/src/main/paradox/scala/cluster-singleton.md index 96db2b1be2..999640ac0b 100644 --- a/akka-docs/src/main/paradox/scala/cluster-singleton.md +++ b/akka-docs/src/main/paradox/scala/cluster-singleton.md @@ -110,21 +110,23 @@ 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: - -``` - - com.typesafe.akka - akka-cluster-tools_@binVersion@ - @version@ - -``` +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-cluster-tools_$scala.binary_version$ + $akka.version$ + + ``` + @@@ ## Configuration diff --git a/akka-docs/src/main/paradox/scala/cluster-usage.md b/akka-docs/src/main/paradox/scala/cluster-usage.md index e741c01f6c..6fd8e44e15 100644 --- a/akka-docs/src/main/paradox/scala/cluster-usage.md +++ b/akka-docs/src/main/paradox/scala/cluster-usage.md @@ -6,9 +6,11 @@ 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 ``` -"com.typesafe.akka" %% "akka-cluster" % "@version@" @crossString@ +"com.typesafe.akka" %% "akka-cluster" % $akka.version$ ``` +@@@ ## A Simple Cluster Example @@ -77,9 +79,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-scala) +@extref[Akka Cluster Sample with Scala](ecs:akka-samples-cluster-scala) 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-scala). +The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-cluster-scala). ## Joining to Seed Nodes @@ -331,9 +333,9 @@ actor. Death watch generates the `Terminated` message to the watching actor when unreachable cluster node has been downed and removed. The easiest way to run **Worker Dial-in Example** example yourself is to download the ready to run -[Akka Cluster Sample with Scala](@exampleCodeService@/akka-samples-cluster-scala) +@extref[Akka Cluster Sample with Scala](ecs:akka-samples-cluster-scala) together with the tutorial. It contains instructions on how to run the **Worker Dial-in Example** sample. -The source code of this sample can be found in the [Akka Samples Repository](@samples@/akka-sample-cluster-scala). +The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-cluster-scala). ## Node Roles @@ -623,9 +625,9 @@ This means that user requests can be sent to `StatsService` on any node and it w `StatsWorker` on all nodes. The easiest way to run **Router Example with Group of Routees** example yourself is to download the ready to run -[Akka Cluster Sample with Scala](@exampleCodeService@/akka-samples-cluster-scala) +@extref[Akka Cluster Sample with Scala](ecs:akka-samples-cluster-scala) together with the tutorial. It contains instructions on how to run the **Router Example with Group of Routees** sample. -The source code of this sample can be found in the [Akka Samples Repository](@samples@/akka-sample-cluster-scala). +The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-cluster-scala). ### Router with Pool of Remote Deployed Routees @@ -706,9 +708,9 @@ akka.actor.deployment { ``` The easiest way to run **Router Example with Pool of Remote Deployed Routees** example yourself is to download the ready to run -[Akka Cluster Sample with Scala](@exampleCodeService@/akka-samples-cluster-scala) +@extref[Akka Cluster Sample with Scala](ecs:akka-samples-cluster-scala) together with the tutorial. It contains instructions on how to run the **Router Example with Pool of Remote Deployed Routees** sample. -The source code of this sample can be found in the [Akka Samples Repository](@samples@/akka-sample-cluster-scala). +The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-cluster-scala). ## Cluster Metrics @@ -803,7 +805,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: diff --git a/akka-docs/src/main/paradox/scala/distributed-data.md b/akka-docs/src/main/paradox/scala/distributed-data.md index 0286cb74f2..bd24f59334 100644 --- a/akka-docs/src/main/paradox/scala/distributed-data.md +++ b/akka-docs/src/main/paradox/scala/distributed-data.md @@ -583,7 +583,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 Scala](@exampleCodeService@/akka-samples-distributed-data-scala) ([source code](@samples@/akka-sample-distributed-data-scala)) +tutorial named @extref[Akka Distributed Data Samples with Scala](ecs:akka-samples-distributed-data-scala) (@extref[source code](samples:akka-sample-distributed-data-scala)) * Low Latency Voting Service * Highly Available Shopping Cart @@ -628,21 +628,23 @@ paper by Mark Shapiro et. al. To use Distributed Data you must add the following dependency in your project. -sbt: - -``` -"com.typesafe.akka" %% "akka-distributed-data" % "@version@" @crossString@ -``` - -maven: - -``` - - com.typesafe.akka - akka-distributed-data_@binVersion@ - @version@ - -``` +sbt +: @@@vars + ``` + "com.typesafe.akka" %% "akka-distributed-data" % $akka.version$ + ``` + @@@ + +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-distributed-data_$scala.binary_version$ + $akka.version$ + + ``` + @@@ ## Configuration diff --git a/akka-docs/src/main/paradox/scala/distributed-pub-sub.md b/akka-docs/src/main/paradox/scala/distributed-pub-sub.md index f5eef2e3b9..f00a6e05f4 100644 --- a/akka-docs/src/main/paradox/scala/distributed-pub-sub.md +++ b/akka-docs/src/main/paradox/scala/distributed-pub-sub.md @@ -186,18 +186,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: - -``` - - com.typesafe.akka - akka-cluster-tools_@binVersion@ - @version@ - -``` \ No newline at end of file +Maven +: @@@vars + ``` + + com.typesafe.akka + akka-cluster-tools_$scala.binary_version$ + $akka.version$ + + ``` + @@@ \ No newline at end of file diff --git a/akka-docs/src/main/paradox/scala/event-bus.md b/akka-docs/src/main/paradox/scala/event-bus.md index 9280aaa187..b65b4c32eb 100644 --- a/akka-docs/src/main/paradox/scala/event-bus.md +++ b/akka-docs/src/main/paradox/scala/event-bus.md @@ -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 diff --git a/akka-docs/src/main/paradox/scala/fsm.md b/akka-docs/src/main/paradox/scala/fsm.md index ef346cfc9b..1f675f4b12 100644 --- a/akka-docs/src/main/paradox/scala/fsm.md +++ b/akka-docs/src/main/paradox/scala/fsm.md @@ -476,6 +476,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-scala) +downloaded as a ready to run @extref[Akka FSM sample](ecs:akka-samples-fsm-scala) together with a tutorial. The source code of this sample can be found in the -[Akka Samples Repository](@samples@/akka-sample-fsm-scala). \ No newline at end of file +@extref[Akka Samples Repository](samples:akka-sample-fsm-scala). \ No newline at end of file diff --git a/akka-docs/src/main/paradox/scala/io-tcp.md b/akka-docs/src/main/paradox/scala/io-tcp.md index 11d68fd0c4..ca79e1767c 100644 --- a/akka-docs/src/main/paradox/scala/io-tcp.md +++ b/akka-docs/src/main/paradox/scala/io-tcp.md @@ -180,7 +180,7 @@ to the network socket. These write back-pressure 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/scala/code/docs/io/EchoServer.scala). +available @extref[on GitHub](github:akka-docs/rst/scala/code/docs/io/EchoServer.scala). For back-pressuring reads there are two modes of operation diff --git a/akka-docs/src/main/paradox/scala/multi-jvm-testing.md b/akka-docs/src/main/paradox/scala/multi-jvm-testing.md index 30162ea7c5..068bec2c25 100644 --- a/akka-docs/src/main/paradox/scala/multi-jvm-testing.md +++ b/akka-docs/src/main/paradox/scala/multi-jvm-testing.md @@ -21,7 +21,7 @@ You can specify JVM options for the forked JVMs: jvmOptions in MultiJvm := Seq("-Xmx256M") ``` -Here is an example of a [sample project](@samples@/tree/master/akka-sample-multi-node-scala) that uses the `sbt-multi-jvm` plugin. +Here is an example of a @extref[sample project](samples:tree/master/akka-sample-multi-node-scala) that uses the `sbt-multi-jvm` plugin. ## Running tests diff --git a/akka-docs/src/main/paradox/scala/multi-node-testing.md b/akka-docs/src/main/paradox/scala/multi-node-testing.md index 4209d3a07a..c5420ca15a 100644 --- a/akka-docs/src/main/paradox/scala/multi-node-testing.md +++ b/akka-docs/src/main/paradox/scala/multi-node-testing.md @@ -152,11 +152,14 @@ complete the test names. The multi node testing kit is a separate jar file. Make sure that you have the following dependency in your project: +@@@vars ``` -"com.typesafe.akka" %% "akka-multi-node-testkit" % "@version@" @crossString@``` +"com.typesafe.akka" %% "akka-multi-node-testkit" % $akka.version$ +``` +@@@ If you are using the latest nightly build you should pick a timestamped Akka version from -[http://repo.akka.io/snapshots/com/typesafe/akka/akka-multi-node-testkit_@binVersion@/](http://repo.akka.io/snapshots/com/typesafe/akka/akka-multi-node-testkit_@binVersion@/). +[http://repo.akka.io/snapshots/com/typesafe/akka/akka-multi-node-testkit_2.11/](http://repo.akka.io/snapshots/com/typesafe/akka/akka-multi-node-testkit_2.11/). We recommend against using `SNAPSHOT` in order to obtain stable builds. ## A Multi Node Testing Example @@ -177,8 +180,8 @@ message send/receive. @@snip [MultiNodeSample.scala]($akka$/akka-remote-tests/src/multi-jvm/scala/akka/remote/sample/MultiNodeSample.scala) { #package #spec } The easiest way to run this example yourself is to download the ready to run -[Akka Multi-Node Testing Sample with Scala](@exampleCodeService@/akka-samples-multi-node-scala) -together with the tutorial. The source code of this sample can be found in the [Akka Samples Repository](@samples@/akka-sample-multi-node-scala). +@extref[Akka Multi-Node Testing Sample with Scala](ecs:akka-samples-multi-node-scala) +together with the tutorial. The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-multi-node-scala). ## Things to Keep in Mind diff --git a/akka-docs/src/main/paradox/scala/persistence-query-leveldb.md b/akka-docs/src/main/paradox/scala/persistence-query-leveldb.md index 63c0a05ce7..0cb76733df 100644 --- a/akka-docs/src/main/paradox/scala/persistence-query-leveldb.md +++ b/akka-docs/src/main/paradox/scala/persistence-query-leveldb.md @@ -8,9 +8,11 @@ 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 ``` -"com.typesafe.akka" %% "akka-persistence-query" % "@version@" @crossString@ +"com.typesafe.akka" %% "akka-persistence-query" % $akka.version$ ``` +@@@ ## How to get the ReadJournal diff --git a/akka-docs/src/main/paradox/scala/persistence-query.md b/akka-docs/src/main/paradox/scala/persistence-query.md index 0ae37e5b30..0c07201943 100644 --- a/akka-docs/src/main/paradox/scala/persistence-query.md +++ b/akka-docs/src/main/paradox/scala/persistence-query.md @@ -14,9 +14,11 @@ 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 ``` -"com.typesafe.akka" %% "akka-persistence-query" % "@version@" @crossString@ +"com.typesafe.akka" %% "akka-persistence-query" % $akka.version$ ``` +@@@ ## Design overview diff --git a/akka-docs/src/main/paradox/scala/persistence.md b/akka-docs/src/main/paradox/scala/persistence.md index 6510d6aecd..25b77d47fd 100644 --- a/akka-docs/src/main/paradox/scala/persistence.md +++ b/akka-docs/src/main/paradox/scala/persistence.md @@ -17,9 +17,11 @@ concepts and architecture of [eventsourced](https://github.com/eligosource/event Akka persistence is a separate jar file. Make sure that you have the following dependency in your project: +@@@vars ``` -"com.typesafe.akka" %% "akka-persistence" % "@version@" @crossString@ +"com.typesafe.akka" %% "akka-persistence" % $akka.version$ ``` +@@@ 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. @@ -94,9 +96,9 @@ stored, e.g. due to serialization error, `onPersistRejected` will be invoked (lo by default) and the actor continues with the 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-scala) +@extref[Akka Persistence Sample with Scala](ecs:akka-samples-persistence-scala) 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-scala). +The source code of this sample can be found in the @extref[Akka Samples Repository](samples:akka-sample-persistence-scala). @@@ note @@ -903,7 +905,7 @@ In order to help developers build correct and high quality storage plugins, we p The TCK is usable from Java as well as Scala projects. For Scala you need to include the akka-persistence-tck dependency: ``` -"com.typesafe.akka" %% "akka-persistence-tck" % "@version@" % "test" +"com.typesafe.akka" %% "akka-persistence-tck" % "$akka.version$" % "test" ``` To include the Journal TCK tests in your test suite simply extend the provided `JournalSpec`: diff --git a/akka-docs/src/main/paradox/scala/project/licenses.md b/akka-docs/src/main/paradox/scala/project/licenses.md index 0e80c9e88d..78d6829f90 100644 --- a/akka-docs/src/main/paradox/scala/project/licenses.md +++ b/akka-docs/src/main/paradox/scala/project/licenses.md @@ -28,4 +28,4 @@ It can be [signed online](http://www.lightbend.com/contribute/cla). ## Licenses for Dependency Libraries Each dependency and its license can be seen in the project build file (the comment on the side of each dependency): -[AkkaBuild.scala](@github@/project/AkkaBuild.scala#L1054) \ No newline at end of file +@extref[AkkaBuild.scala](github:project/AkkaBuild.scala#L1054) \ No newline at end of file diff --git a/akka-docs/src/main/paradox/scala/project/links.md b/akka-docs/src/main/paradox/scala/project/links.md index 00b3c7a9e2..197a718bc7 100644 --- a/akka-docs/src/main/paradox/scala/project/links.md +++ b/akka-docs/src/main/paradox/scala/project/links.md @@ -37,7 +37,7 @@ Nightly builds are available in [http://repo.akka.io/snapshots](http://repo.akka timestamped versions. For timestamped versions, pick a timestamp from -[http://repo.akka.io/snapshots/com/typesafe/akka/akka-actor_@binVersion@](http://repo.akka.io/snapshots/com/typesafe/akka/akka-actor_@binVersion@)/. +[http://repo.akka.io/snapshots/com/typesafe/akka](http://repo.akka.io/snapshots/com/typesafe/akka). All Akka modules that belong to the same build have the same timestamp. @@@ warning @@ -56,10 +56,11 @@ resolvers += "Akka Snapshots" at "http://repo.akka.io/snapshots/" Define the library dependencies with the timestamp as version. For example: +@@@vars ``` -libraryDependencies += "com.typesafe.akka" % "akka-remote_@binVersion@" % - "2.5-20170510-230859" +libraryDependencies += "com.typesafe.akka" % "akka-remote_$scala.binary_version$" % "2.5-20170510-230859" ``` +@@@ ### maven definition of snapshot repository @@ -78,12 +79,14 @@ Make sure that you add the repository to the maven repositories in pom.xml: Define the library dependencies with the timestamp as version. For example: +@@@vars ``` com.typesafe.akka - akka-remote_@binVersion@ + akka-remote_$scala.binary_version$ 2.5-20170510-230859 -``` \ No newline at end of file +``` +@@@ diff --git a/akka-docs/src/main/paradox/scala/remoting-artery.md b/akka-docs/src/main/paradox/scala/remoting-artery.md index 8d4db41ada..9fbbc08d77 100644 --- a/akka-docs/src/main/paradox/scala/remoting-artery.md +++ b/akka-docs/src/main/paradox/scala/remoting-artery.md @@ -45,9 +45,11 @@ are also different. The Akka remoting is a separate jar file. Make sure that you have the following dependency in your project: +@@@vars ``` -"com.typesafe.akka" %% "akka-remote" % "@version@" @crossString@ +"com.typesafe.akka" %% "akka-remote" % $akka.version$ ``` +@@@ To enable remote capabilities in your Akka project you should, at a minimum, add the following changes to your `application.conf` file: @@ -567,9 +569,9 @@ That is not done by the router. ## Remoting Sample -You can download a ready to run [remoting sample](@exampleCodeService@/akka-samples-remote-scala) +You can download a ready to run @extref[remoting sample](ecs:akka-samples-remote-scala) 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-scala). +@extref[Akka Samples Repository](samples:akka-sample-remote-scala). ## Performance tuning @@ -715,7 +717,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 diff --git a/akka-docs/src/main/paradox/scala/remoting.md b/akka-docs/src/main/paradox/scala/remoting.md index 2011a8d651..4d44d121f9 100644 --- a/akka-docs/src/main/paradox/scala/remoting.md +++ b/akka-docs/src/main/paradox/scala/remoting.md @@ -17,9 +17,11 @@ 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 ``` -"com.typesafe.akka" %% "akka-remote" % "@version@" @crossString@ +"com.typesafe.akka" %% "akka-remote" % $akka.version$ ``` +@@@ To enable remote capabilities in your Akka project you should, at a minimum, add the following changes to your `application.conf` file: @@ -396,9 +398,9 @@ That is not done by the router. ## Remoting Sample -You can download a ready to run [remoting sample](@exampleCodeService@/akka-samples-remote-scala) +You can download a ready to run @extref[remoting sample](ecs:akka-samples-remote-scala) 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-scala). +@extref[Akka Samples Repository](samples:akka-sample-remote-scala). ### Remote Events diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 3510feae3f..cf5b8193c8 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -117,6 +117,7 @@ object Dependencies { object Provided { // TODO remove from "test" config + // If changed, update akka-docs/build.sbt as well val sigarLoader = "io.kamon" % "sigar-loader" % "1.6.6-rev002" % "optional;provided;test" // ApacheV2 val levelDB = "org.iq80.leveldb" % "leveldb" % "0.7" % "optional;provided" // ApacheV2