It is not possible to define stream retention policies during the stream creation, like x-max-age, x-max-length-bytes or x-stream-max-segment-size-bytes. All passed arguments are ignored.
const client = await connect({
hostname: 'localhost',
port: 5552,
username: user,
password: password,
vhost: '/',
});
await client.createStream({
stream: streamName,
arguments: {
'x-max-age': '1d',
'x-max-length-bytes': 20_000_000_000, // maximum stream size: 20 GB
'x-stream-max-segment-size-bytes': 100_000_000, // size of segment files: 100 MB
},
});
