Skip to content

Compatibility

Compatibility with NATS client libraries

There’s a new storage type defined, nats.InfiniStorage but code can be run with nats.FileStorage compatibility mode, thereby requiring no change at all. You can use nats.InfiniStorage (with a simple patch)

The change is as simple as:

_, err = js.AddStream(&nats.StreamConfig{
...
Storage: nats.InfiniStorage,
})

That’s it. We define a new storage engine InfiniStorage so your code can co-exist with standard NATS/JetStream servers.