🎭
GoAkt
GithubReference
  • 👋Introduction
  • 🏛️Design Principles
  • 🔢Versioning
  • 💡Use Cases
  • 🚀Get Started
  • 📦Binaries and Go versions
  • features
    • Actor System
    • Actor
    • Mailbox
    • Messaging
    • PipeTo
    • Passivation
    • Supervision
    • Behaviors
    • Remoting and APIs
    • TLS
    • Scheduler
    • Stashing
    • Routers
    • Events Stream
    • Coordinated Shutdown
    • Persistence
    • Observability
    • Testkit
    • Cluster
    • Service Discovery
    • Cluster Singleton
    • Cluster Client
  • Cluster PubSub
  • Extensions
  • Dependencies
  • Meta Framework
    • eGo
Powered by GitBook
On this page
  • Supported events
  • Note
  1. features

Events Stream

PreviousRoutersNextCoordinated Shutdown

Last updated 1 day ago

To receive some system events and act on them for some particular business cases, you just need to call the actor system Subscribe. Make sure to Unsubscribe whenever the subscription is no longer needed to free allocated resources. The subscription methods can be found on the ActorSystem interface.

Supported events

  • : emitted when an actor has started

  • : emitted when an actor has stopped

  • : emitted when an actor is passivated

  • : emitted when a child actor is created

  • : emitted when an actor has restarted

  • : emitted when an actor has been suspended

  • : emitted when an actor has been reinstated from its suspended state.

  • : cluster event emitted when a node joins the cluster. This only happens when cluster mode is enabled

  • : cluster event emitted when a node leaves the cluster. This only happens when cluster mode is enabled

  • : emitted when a message cannot be delivered or that were not handled by a given actor. Dead letters are automatically emitted when a message cannot be delivered to actors' mailbox or when an Ask times out. Also, one can emit dead letters from the receiving actor by using the ctx.Unhandled() method. This is useful instead of panicking when the receiving actor does not know how to handle a particular message. Dead letters are not propagated over the network, there are tied to the local actor system.

Note

Events that are not handled will be dropped because there is no persistence layer or a replay mechanism. There are processed as they come into the stream.

ActorStarted
ActorStopped
ActorPassivated
ActorChildCreated
ActorRestarted
ActorSuspended
ActorReinstated
NodeJoined
NodeLeft
Deadletter