You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: adr/ADR-19.md
+36Lines changed: 36 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,3 +76,39 @@ This is a side effect of JetStream having a two token API prefix and the materia
76
76
This problem can be avoided by unifying the API name spaces to alway be two tokens with the second token being `API`, resulting in `$JS.API`, `$KV.API` and `$OBJ.API`.
77
77
This however will not be backwards compatible.
78
78
79
+
## Testing
80
+
81
+
Here is a server config to test your changes. The prefix fo use is" `fromA`
82
+
83
+
```
84
+
jetstream: enabled
85
+
accounts: {
86
+
A: {
87
+
users: [ {user: a, password: a} ]
88
+
jetstream: enabled
89
+
exports: [
90
+
{service: '$JS.API.>' }
91
+
{service: '$KV.>'}
92
+
]
93
+
},
94
+
I: {
95
+
users: [ {user: i, password: i} ]
96
+
imports: [
97
+
{service: {account: A, subject: '$JS.API.>'}, to: 'fromA.>' }
98
+
{service: {account: A, subject: '$KV.>'}, to: 'fromA.$KV.>' }
99
+
]
100
+
}
101
+
}
102
+
```
103
+
104
+
Test JetStream connected to account `I` talking to JetStream in account `A`: `nats account info -s "nats://i:i@localhost:4222" --js-api-prefix fromA`
105
+
106
+
KV publishes and subscribes need to support the prefix as well.
107
+
Absent an actual implementation this is simulated with pub/sub.
108
+
Your implementation needs to be able to connect to account I and access map ojbjects in Account A.
109
+
110
+
```
111
+
nats -s "nats://a:a@localhost:4222" sub '$KV.map.>' &
0 commit comments