Skip to content

DistributedPubSub: topic names with characters that require UriEncode escaping can't be received by subscribers #7628

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
Aaronontheweb opened this issue May 9, 2025 · 1 comment

Comments

@Aaronontheweb
Copy link
Member

Version Information
Version of Akka.NET? v1.5.41
Which Akka.NET Modules? Akka.Cluster.Tools

Describe the bug

If a user Subscribe to a topic that contains a Uri-unfriendly character, such as this: {parentTopic}:{childTopic} - that : is going to get UriEncode-d by the Mediator when we create the Topic child actor for managing that topic.

It looks like subsequent when Publish is attempting on that topic will get DeadLetter'd because we don't also encode the Topic name on each subsequent publish operation - and since the topic name and the Topic actor name are now different, these messages get viewed as "having no subscribers" and are DeadLetter'd per #7626

Expected behavior

Publishing should still work even if the topic names have Uri-unfriendly characters in them.

Actual behavior

Messages appear to get permanently lost upon publication.

@Arkatufus
Copy link
Contributor

This is weird because the published message does get uri encoded during publish:

Receive<Publish>(publish =>
{
string path = Internal.Utils.MakeKey(Self.Path / Internal.Utils.EncodeName(publish.Topic));
if (publish.SendOneMessageToEachGroup)
PublishToEachGroup(path, publish);
else
PublishMessage(path, publish);
});

Could there be other bugs involved?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants