apache / pekko

Build highly concurrent, distributed, and resilient message-driven applications using Java/Scala
https://pekko.apache.org/
Apache License 2.0
1.2k stars 148 forks source link

Feature Request: Streamlined approach for Behavior Factory #1444

Closed Roiocam closed 2 months ago

Roiocam commented 2 months ago

Motivation

avoid annoying method call

// current creation
Behaviors.receiveMessage(e -> {
    forwardRef.tell(e);
    return Behaviors.same();
});

// expect feature
Behaviors.receiveMessageSame(msg -> forwardRef.tell(msg));