NexusStreamObserver receives structured callbacks for every stream lifecycle transition. It is the way to wire SDK state into dashboards, custom telemetry, or load-test tooling - far more reliable than matching log lines.
The observer is opt-in. Without one the SDK uses NexusStreamObserver.NOOP. The auto-configuration picks up any NexusStreamObserver bean; a plain client takes one through NexusConfig.builder().observer(...).
The interface
default - implement only the hooks you care about.
Hook semantics
Fallback reasons
Every reason except
service-locked reconnects on its own. Track the actual connection state with onConnected / onDisconnected or client.isStreamConnected().
