The Akka receptionist is a system-wide service registry for discovering actors that are not children, initialization parameters, or message-passed references. Actors register under a typed ServiceKey, while subscribers receive notifications when registrations change. section 6.0 section 6.1
A typical discovery flow uses these operations:
- Define a ServiceKey whose name and message type identify the service. section 6.1
- Register an actor by sending Receptionist.Register with the key and actor reference. section 6.1
- Subscribe with a message adapter, because receptionist listings belong to the receptionist API rather than the subscriber’s protocol. section 6.1
- Handle each Receptionist.Listing to inspect the currently registered actors; use Find for a one-time lookup or Deregister when an actor leaves. section 6.1
Hotel concierge discovery
A HotelConcierge subscribes to goldenKey, a ServiceKey[VIPGuest.Command]. When VIP guests enter, they register themselves. The concierge receives a listing and logs each guest; later registrations produce listings containing the existing and new guests.
