Makes Redis7 (v9 client) match the Redis6 (v8 client) behavior (#2833)
Signed-off-by: Bernd Verst <github@bernd.dev>
This commit is contained in:
parent
13c00583a4
commit
58dbcf92ad
|
@ -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
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue