[Issue #19] Add namespace-scoped event stores #48
Reference in New Issue
Block a user
Delete Branch "issue-19-namespace-scoped-stores"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
{namespace}_{streamName}formatChanges
Namespacefield toJetStreamConfigNewJetStreamEventStoreWithNamespace()convenience constructorGetNamespace()andGetStreamName()accessor methodsBackward Compatibility
Empty namespace (default) works exactly as before - no stream name changes.
Closes #19
AI Code Review - Namespace-Scoped Event Stores
This is an automated review generated by the code-reviewer agent.
Summary
This PR successfully implements namespace-scoped event stores with optional namespace prefixes for JetStream streams. The implementation correctly prefixes stream names with sanitized namespace values and maintains perfect backward compatibility.
Findings
Code Quality
Namespace Isolation Implementation
Test Coverage
Backward Compatibility
Documentation
Other Changes
The PR includes unrelated cluster package improvements:
These changes are not mentioned in the PR description and should ideally be in a separate PR.
Verdict
LGTM with Minor Recommendation
The namespace isolation implementation is solid, well-tested at the unit level, and maintains perfect backward compatibility. The code is production-ready.
Recommendation: Add integration tests verifying namespace isolation with real NATS server (blocked on issue #10). Unit tests provide good confidence but integration tests would validate the end-to-end isolation guarantee.
Note on scope: Cluster package improvements are welcome but tangential to the namespace feature. Consider separating these for clearer git history.