Marathon API


This module is community maintained and the Lightbend subscription doesn’t cover support for this module. It is also marked as may change. That means that the API, configuration or semantics can change without warning or deprecation period.

Marathon currently ignores all fields apart from service name. This is expected to change.

If you’re a Mesos or DC/OS user, you can use the provided Marathon API implementation. You’ll need to add a label to your Marathon JSON (named ACTOR_SYSTEM_NAME by default) and set the value equal to the name of the configured effective name, which defaults to your applications actor system name.

You’ll also have to add a named port, by default akkamgmthttp, and ensure that Akka Management’s HTTP interface is bound to this port.

Project Info

Project Info: Akka Discovery Marathon
JDK versions
Adopt OpenJDK 8 with Hotspot
Adopt OpenJDK 11 with Hotspot
Scala versions2.11.12, 2.12.10, 2.13.0
Readiness level
Since 0.10.0, 2018-01-26
Home page
API documentation
Release notesGitHub releases
IssuesGitHub issues

Dependencies and usage

This is a separate JAR file:

libraryDependencies += "com.lightbend.akka.discovery" %% "akka-discovery-marathon-api" % "1.0.7"
dependencies {
  compile group: 'com.lightbend.akka.discovery', name: 'akka-discovery-marathon-api_2.12', version: '1.0.7'

akka-discovery-marathon-api can be used with Akka 2.5.27 or 2.6.5 or later. You have to override the following Akka dependencies by defining them explicitly in your build and define the Akka version to the one that you are using. Latest patch version of Akka is recommended and a later version than 2.6.5 can be used.

val AkkaVersion = "2.6.5"
libraryDependencies ++= Seq(
  "com.typesafe.akka" %% "akka-cluster" % AkkaVersion,
  "com.typesafe.akka" %% "akka-discovery" % AkkaVersion
versions += [
  AkkaVersion: "2.6.5",
  ScalaBinary: "2.12"
dependencies {
  compile group: 'com.typesafe.akka', name: "akka-cluster_${versions.ScalaBinary}", version: versions.AkkaVersion,
  compile group: 'com.typesafe.akka', name: "akka-discovery_${versions.ScalaBinary}", version: versions.AkkaVersion

And in your application.conf:

akka.discovery {
  method = marathon-api

And in your marathon.json:

   "cmd": "path-to-your-app -Dakka.remote.netty.tcp.hostname=$HOST -Dakka.remote.netty.tcp.port=$PORT_AKKAREMOTE$HOST$PORT_AKKAMGMTHTTP",

   "labels": {
     "ACTOR_SYSTEM_NAME": "my-system"

   "portDefinitions": [
     { "port": 0, "name": "akkaremote" },
     { "port": 0, "name": "akkamgmthttp" }
Found an error in this documentation? The source code for this page can be found here. Please feel free to edit and contribute a pull request.