coders51 / rabbitmq-stream-js-client

rabbitmq-stream-js-client
MIT License
34 stars 5 forks source link

[bug] Stream arguments are ignored when creating a new stream #174

Closed SashaYurchenko closed 9 months ago

SashaYurchenko commented 10 months ago

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
    },
  });
Screenshot 2024-01-27 at 18 17 48
tarzacodes commented 10 months ago

On it - we'll also add a test on the pipeline to check for this. Expect this to be fixed next release