From 389a5eb7b1fa1131f19439cba0ce0ceb6ff8680e Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 27 Jul 2023 16:49:49 -0500 Subject: [PATCH 1/2] DistributedPubSub: make query to count local subscribers for topic public close #3663 - between this and `Topic`s all local data should be queryable for distributed pub-sub --- .../PublishSubscribe/Internal/TopicMessages.cs | 4 ++-- .../CoreAPISpec.ApproveClusterTools.DotNet.verified.txt | 8 ++++++++ .../CoreAPISpec.ApproveClusterTools.Net.verified.txt | 8 ++++++++ 3 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs index a2a80319f0b..414f99448d3 100644 --- a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs +++ b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs @@ -42,9 +42,9 @@ private Count() { } } /// - /// TBD + /// Get all subscribers for a given topic. /// - internal sealed class CountSubscribers + public sealed class CountSubscribers { public string Topic { get; } diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt index 9527f9cd6be..4166353b36b 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt @@ -318,6 +318,14 @@ namespace Akka.Cluster.Tools.PublishSubscribe public override string ToString() { } } } +namespace Akka.Cluster.Tools.PublishSubscribe.Internal +{ + public sealed class CountSubscribers + { + public CountSubscribers(string topic) { } + public string Topic { get; } + } +} namespace Akka.Cluster.Tools.PublishSubscribe.Serialization { public class DistributedPubSubMessageSerializer : Akka.Serialization.SerializerWithStringManifest diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt index 246186de841..de3945a2a0f 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt @@ -318,6 +318,14 @@ namespace Akka.Cluster.Tools.PublishSubscribe public override string ToString() { } } } +namespace Akka.Cluster.Tools.PublishSubscribe.Internal +{ + public sealed class CountSubscribers + { + public CountSubscribers(string topic) { } + public string Topic { get; } + } +} namespace Akka.Cluster.Tools.PublishSubscribe.Serialization { public class DistributedPubSubMessageSerializer : Akka.Serialization.SerializerWithStringManifest From 6e8ab3606b6acc02dc8292a825d390549a598b8f Mon Sep 17 00:00:00 2001 From: Aaron Stannard Date: Thu, 27 Jul 2023 17:00:20 -0500 Subject: [PATCH 2/2] added `ApiMayChange` attribute --- .../PublishSubscribe/Internal/TopicMessages.cs | 2 ++ .../verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt | 1 + .../verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt | 1 + 3 files changed, 4 insertions(+) diff --git a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs index 414f99448d3..33f40e1fe19 100644 --- a/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs +++ b/src/contrib/cluster/Akka.Cluster.Tools/PublishSubscribe/Internal/TopicMessages.cs @@ -10,6 +10,7 @@ using System.Collections.Immutable; using System.Linq; using Akka.Actor; +using Akka.Annotations; using Akka.Event; using Akka.Routing; @@ -44,6 +45,7 @@ private Count() { } /// /// Get all subscribers for a given topic. /// + [ApiMayChange] public sealed class CountSubscribers { public string Topic { get; } diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt index 4166353b36b..d91360aef5c 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.DotNet.verified.txt @@ -320,6 +320,7 @@ namespace Akka.Cluster.Tools.PublishSubscribe } namespace Akka.Cluster.Tools.PublishSubscribe.Internal { + [Akka.Annotations.ApiMayChangeAttribute()] public sealed class CountSubscribers { public CountSubscribers(string topic) { } diff --git a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt index de3945a2a0f..c891d1dc5da 100644 --- a/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt +++ b/src/core/Akka.API.Tests/verify/CoreAPISpec.ApproveClusterTools.Net.verified.txt @@ -320,6 +320,7 @@ namespace Akka.Cluster.Tools.PublishSubscribe } namespace Akka.Cluster.Tools.PublishSubscribe.Internal { + [Akka.Annotations.ApiMayChangeAttribute()] public sealed class CountSubscribers { public CountSubscribers(string topic) { }