Skip to content

Cannot unset the context JS domain #1284

@Zambito1

Description

@Zambito1

Observed behavior

When you have a JS domain specified in your context, Jetstream requests are made to $JS.<domain>.<endpoint>. You can override the domain specified in the context using --js-domain. For example, the nats stream ls command will make a request to $JS.foo.API.STREAM.LIST when your selected context is in the foo JS domain, but if you specify --js-domain=bar, it will make the request to $JS.bar.API.STREAM.LIST. There is currently no way to achieve the standard, unspecified domain behavior when using a context that has a specified JS domain.

Expected behavior

--js-domain='' should unset the JS domain of the context for the current command.

Server and client version

Client: v0.1.2-0.20250217122005-9e54943a82b2

Host environment

Ubuntu 24.10

Steps to reproduce

  • Create and select a context with a Jetstream Domain specified
  • Try to interface with access unspecified domain endpoints ($JS.<endpoint>) using the nats stream subcommands, without selecting another context

Metadata

Metadata

Assignees

No one assigned

    Labels

    defectSuspected defect such as a bug or regression

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions