Hi,

I was surprised to discover that the DistributedPubSub does not simply 
forward a published message to all (0 or more) subscribers for a given 
topic. There's a special case implemented to send the message to the 
DeadLetter in case there are no subscribers for that topic 
(https://github.com/akka/akka/blob/9d2bec7f232b628cc087231af75e457072823e61/akka-cluster-tools/src/main/scala/akka/cluster/pubsub/DistributedPubSubMediator.scala#L716).
 
Sending these messages to DeadLetter makes it look like it's something 
wrong, while IMO it's a perfectly valid and common use case for 
publish-subscribe pattern to have 0 or more subscribers. I see value of 
this behaviour during debugging, but it's strange that it's a default and 
as far as I can see it can't be disabled. 

What is the reason why DistributedPubSub is implemented this way?

What is the best way to avoid published messages ending up in the 
DeadLetter? Currently I'm spawning a fake subscriber actor (usually one per 
node) for each topic I plan to publish some messages to.

Best Regards
Rafał

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to