Dns discovery custom resolver (#25937)

* Import service discovery from akka-management

* Rename extension to Discovery to go with akka-discovery name
* Rename interafce to ServiceDisovery
* Import config, aggregate and dns
* Discovery documentation
* Load isolated async-dns if not configured as default
* OSGi for discovery
* Remove warning for not using in production
* Fail if old akka management on classpath
* Only allow async dns to be loaded as an additional resolver
* Use method in all of service discovery, not mechanism
* Mima filter
* Add discovery to aggregate
* Set discovery mima versions
* DnsDiscoverySpec: Only run docker test if docker available
This commit is contained in:
Christopher Batey 2018-12-05 13:01:24 +00:00 committed by Patrik Nordwall
parent bca269d684
commit c5c2f951db
26 changed files with 1642 additions and 32 deletions

View file

@ -148,6 +148,8 @@ object Dependencies {
val actor = l ++= Seq(config, java8Compat.value)
val discovery = l ++= Seq(Test.junit, Test.scalatest.value)
val testkit = l ++= Seq(Test.junit, Test.scalatest.value) ++ Test.metricsAll
val actorTests = l ++= Seq(

View file

@ -24,7 +24,8 @@ object MiMa extends AutoPlugin {
val versions: Seq[String] = {
val akka24NoStreamVersions = Seq("2.4.0", "2.4.1")
val akka25Versions = (0 to latestPatchOf25).map(patch s"2.5.$patch")
val akka24StreamVersions = (2 to 12) map ("2.4." + _)
val akka24StreamVersions = (2 to 12).map("2.4." + _)
val akka25DiscoveryVersions = (19 to latestPatchOf25).map(patch => s"2.5.$patch")
val akka24WithScala212 =
(13 to latestPatchOf24)
.map("2.4." + _)
@ -35,17 +36,24 @@ object MiMa extends AutoPlugin {
"akka-stream-testkit")
val akka250NewArtifacts = Seq(
"akka-persistence-query")
val akka2519NewArtifacts = Seq(
"akka-discovery"
)
scalaBinaryVersion match {
case "2.11"
if (akka250NewArtifacts.contains(projectName)) akka25Versions
if (akka2519NewArtifacts.contains(projectName))
akka25DiscoveryVersions
else if (akka250NewArtifacts.contains(projectName)) akka25Versions
else {
if (!akka242NewArtifacts.contains(projectName)) akka24NoStreamVersions
else Seq.empty
} ++ akka24StreamVersions ++ akka24WithScala212 ++ akka25Versions
case "2.12"
if (akka250NewArtifacts.contains(projectName))
if (akka2519NewArtifacts.contains(projectName))
akka25DiscoveryVersions
else if (akka250NewArtifacts.contains(projectName))
akka25Versions
else
akka24WithScala212 ++ akka25Versions

View file

@ -122,6 +122,8 @@ object OSGi {
val testkit = exports(Seq("akka.testkit.*"))
val discovery = exports(Seq("akka.discovery.*"))
val osgiOptionalImports = Seq(
// needed because testkit is normally not used in the application bundle,
// but it should still be included as transitive dependency and used by BundleDelegatingClassLoader