Skip to content

speier/nats-multi-tenancy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Multi tenancy with NATS

Small proof of concept to try out nats multi tenancy features (accounts, imports/exports and leafnodes).

Usage

Services are running in docker, to spin up the cluster simply run:

❯ docker-compose up # use `-d` to run in the background

Try leafnodes:

# subscribe to leafnode `a` and `b` (note the different port numbers)
❯ nats -s a:@localhost:4223 sub foo
❯ nats -s b:@localhost:4224 sub foo

# publish on main as user `a` and user `b`
❯ nats -s a:@localhost:4222 pub foo bar
❯ nats -s b:@localhost:4222 pub foo bar

Try imports/exports:

# subscribe to leafnode `a`
❯ nats -s a:@localhost:4223 sub foo.bar

# publish on main as user `sys`
❯ nats -s sys:@localhost:4222 pub foo.bar 1

About

poc to try nats multi tenancy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published