Makes Redis7 (v9 client) match the Redis6 (v8 client) behavior (#2833)

Signed-off-by: Bernd Verst <github@bernd.dev>
This commit is contained in:
Bernd Verst 2023-05-11 16:43:56 -05:00 committed by GitHub
parent 13c00583a4
commit 58dbcf92ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 2 additions and 6 deletions

View File

@ -79,11 +79,6 @@ metadata:
"-1" disables backoff.
example: "-1"
default: "512ms"
- name: maxLenApprox
required: false
type: number
description: |
The approximate maximum length of a stream.
- name: failover
type: bool
required: false

View File

@ -95,7 +95,7 @@ type Settings struct {
Concurrency uint `mapstructure:"concurrency" only:"pubsub"`
// the max len of stream
MaxLenApprox int64 `mapstructure:"maxLenApprox" only:"bindings"`
MaxLenApprox int64 `mapstructure:"maxLenApprox" only:"pubsub"`
}
func (s *Settings) Decode(in interface{}) error {

View File

@ -176,6 +176,7 @@ func (c v9Client) XAdd(ctx context.Context, stream string, maxLenApprox int64, v
Stream: stream,
Values: values,
MaxLen: maxLenApprox,
Approx: true,
}).Result()
}