gabbler | Reactive Mircoservices with Akka and Docker | Reactive Programming library
kandi X-RAY | gabbler Summary
kandi X-RAY | gabbler Summary
Reactive Mircoservices with Akka and Docker
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of gabbler
gabbler Key Features
gabbler Examples and Code Snippets
Community Discussions
Trending Discussions on gabbler
QUESTION
I am working with Akka at the moment I have the following protocol.
In my protocol I have a server that is only responsible for creating resources (room and gabblers). These resources are created and then accessed. Next, I would like by means of a key to find the corresponding Gabbler ActorRef to send a message but this time from a class that exposes an API / method that is not an actor. I have seen the documentation and it is incredible to me that there is not a method in the actor system that can return a specific actor from its hierarchy to use it. I have already read the Receptionist section and although it is not very clear to me, I see that it is again oriented to the actors. There is no method in Akka that returns the reference based on the path of the Actor?
...ANSWER
Answered 2021-Jan-14 at 00:09In general, for getting data from actors to outside of the actor system (e.g. the main
method), you're dealing with the ask pattern. When using the ask pattern, you'll need to design your message protocol to support it, typically by having messages that are intended to be asked having an ActorRef
field (often named replyTo
). akka.actor.typed.javadsl.AskPattern.ask
effectively creates a short-lived actor, injects the ActorRef
of that actor into the message, and if it gets a message within a timeout period, it completes a CompletionStage
with that message.
In this application, since you're routing everything from main
through the system
actor, you could define a ChatServer.GetAttendee
message:
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install gabbler
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page