mirror of
https://github.com/hanzoai/pubsub.git
synced 2026-10-30 15:06:26 +00:00
Options.Auth hands every CONNECT to the host's authenticator, which admits it, places it in an account and bounds what it may do. Options.Accounts runs named accounts beside the global one, each with JetStream. An account is its own subject space and its own JetStream, so a stream in one cannot be reached from another by a publish, a republish or a source — the isolation a permission list cannot promise. Naming an account costs NATS's global account its JetStream, and the global account cannot ask for it back in configuration. Open enables it after the accept loop starts and holds every client until it has, so none finds the global streams missing. Co-authored-by: Hanzo Dev <[email protected]>