akka/akka-core

Group router always drops first message

Open

#31,297 建立於 2022年3月30日

在 GitHub 查看
 (3 留言) (0 反應) (0 負責人)Scala (13,277 star) (3,547 fork)batch import
1 - triagedhelp wantedt:typed

描述

Hello,

I have a cluster setup of 2 nodes. One node has service registered with services key over receptionist. Another node is using a group router to contact service on the first node.

Group router documentation has an example with the statement:

// the group router will stash messages until it sees the first listing of registered services from the 
// receptionist, so it is safe to send messages right away
for (int i = 0; i < 10; i++) {
    router.tell(new Worker.DoLog("msg " + i));
}

It states that it is safe to send messages immediately as they are stashed. But it behaves differently. Whenever a new group router is created, a new/first message gets dropped by the group router that is sent to the service right after the group router creation.

I also noted that subscriptions to the receptionist return 0 service instances on the first listing provided, while the node with the service is actually up and running. Only the second listing notification provides correct information. Seems like there is something to do with the receptionist and probably listing notifications.

Scala binary version 2.13 Akka version 2.6.19

Br, Alexander

貢獻者指南

Group router always drops first message · akka/akka-core#31297 | Good First Issue