Skip to content

DistributedPubSub: IgnoreOrSendToDeadLetters logs make it sound like Mediator is dead #5350

@Aaronontheweb

Description

@Aaronontheweb

Version Information
Version of Akka.NET? 1.4.27
Which Akka.NET Modules? Akka.Cluster.Toools

Describe the bug
Received this log message when publishing to non-existent topic:

[INFO][10/28/2021 1:37:34 PM][Thread 0036][akka://ClusterSys/system/distributedPubSubMediator] Message [String] from akka://ClusterSys/user/tester to akka://ClusterSys/system/distributedPubSubMediator was not delivered. [1] dead
letters encountered. If this is not an expected behavior then akka://ClusterSys/system/distributedPubSubMediator may have terminated unexpectedly. This logging can be turned off or adjusted with configuration settings 'akka.log-d
ead-letters' and 'akka.log-dead-letters-during-shutdown'.

This is due to this code

private void IgnoreOrSendToDeadLetters(object message)
{
if (_settings.SendToDeadLettersWhenNoSubscribers)
Context.System.DeadLetters.Tell(new DeadLetter(message, Sender, Context.Self));
}

Expected behavior
This should provide a clearer explanation - this was published because there were no subscribers for this topic. That would be useful to log.

Actual behavior
A generic DeadLetter log message.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions