akka/akka-core

PubSub Put not working? Documentation coding examples wrong?

開放

#23,500 建立於 2017年8月9日

 (8 則留言) (0 個反應) (0 位負責人)Scala (3,547 個分叉)batch import
1 - triagedhelp wantedt:docs

倉庫指標

星標
 (13,277 顆星)
PR 合併指標
 (平均合併 8天 19小時) (30 天內合併 10 個 PR)

描述

Hi Guys!

I tried to implement Distributed Send PubSub's use case with Akka 2.4.14 and I couldn't get it to work across nodes.

The Destination Put's call never got a SubscribeAck (not sure if it should but in the documentation's code it leads you to believe so)

Also, perhaps related: I noticed that the code examples where copy pasted from the topics above and perhaps led to errors: like these lines:

//somewhere else
ActorRef sender = system.actorOf(Props.create(Publisher.class), "sender");
// after a while the destinations are replicated
sender.tell("hello", null);

As we made a Destination and a Sender class, the creation of a Publisher looks out of place.

So, is the DistributedPubSubMediator.Put call supposed to work across nodes on the same cluster? I eventually ended up doing a Publish with groups and sendOneMessageToEachGroup=true for the same effect.

But I wasn't the only one with that problem as I found this StackOverflow thread:

https://stackoverflow.com/questions/31536080/akka-distributed-pub-sub-java-implementation-not-working/45566384#45566384

Are the docs wrong? is the Put supposed to work across the cluster? did the 2.4.14 version (that was the one shipped with Play 2.5.X) have a bug?

Cheers

貢獻者指南