Skip to content

fix: allow import of same service subject from different accounts#243

Merged
aricart merged 1 commit intonats-io:mainfrom
thobiaskarlsson:feat/import-same-service-from-diff-accounts
Feb 27, 2026
Merged

fix: allow import of same service subject from different accounts#243
aricart merged 1 commit intonats-io:mainfrom
thobiaskarlsson:feat/import-same-service-from-diff-accounts

Conversation

@thobiaskarlsson
Copy link
Contributor

@thobiaskarlsson thobiaskarlsson commented Feb 20, 2026

nats-server already allows importing the same (service) subject from different account, while the jwt does not. This becomes an issue when you, for instance, source JetStreams from different accounts and need to import service $JS.FC.> from both. Before, this could be solved by importing e.g. $JS.FC.STREAM_FROM_ACC_X.> and $JS.FC.STREAM_FROM_ACC_Y.>, but this requires globally unique stream names. If those streams are both called ORDERS then you wouldn't be able to source both.

Issue: nats-io/nats-server#7326
Related: nats-io/nats-server#6704
Related: nats-io/nats-server#6547
Related: nats-io/nats-server#6431

Signed-off-by: Thobias Karlsson thobias.karlsson@gmail.com

@thobiaskarlsson thobiaskarlsson marked this pull request as ready for review February 20, 2026 16:05
@thobiaskarlsson thobiaskarlsson force-pushed the feat/import-same-service-from-diff-accounts branch 2 times, most recently from 0098b9f to f92bb52 Compare February 22, 2026 16:17
nats-server already allows importing the same (service) subject from different account, while the jwt does not. This becomes an issue when you, for instance, source JetStreams from different accounts and need to import service `$JS.FC.>` from both. Before, this could be solved by importing e.g. `$JS.FC.STREAM_FROM_ACC_X.>` and `$JS.FC.STREAM_FROM_ACC_Y.>`, but this requires globally unique stream names. If those streams are both called `ORDERS` then you wouldn't be able to source both.

Issue: nats-io/nats-server#7326
Related: nats-io/nats-server#6704
Related: nats-io/nats-server#6547
Related: nats-io/nats-server#6431

Signed-off-by: Thobias Karlsson <thobias.karlsson@gmail.com>
Copy link
Member

@MauriceVanVeen MauriceVanVeen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@aricart aricart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aricart
Copy link
Member

aricart commented Feb 27, 2026

@thobiaskarlsson thank you for the PR. - will merge as soon as the failure for coveralls is resolved.

@coveralls
Copy link

Pull Request Test Coverage Report for Build 22295578499

Details

  • 11 of 11 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.08%) to 81.153%

Totals Coverage Status
Change from base Build 16832725450: 0.08%
Covered Lines: 2773
Relevant Lines: 3417

💛 - Coveralls

@aricart aricart merged commit e417312 into nats-io:main Feb 27, 2026
3 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants