Skip to content

Commit 8822531

Browse files
committed
- max delivery count
- minid, limit parameters support in the produces level - minid, limit parameters support in the enqueue level
1 parent 6976172 commit 8822531

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

producer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -89,17 +89,17 @@ func NewProducerWithOptions(ctx context.Context, options *ProducerOptions) (*Pro
8989
// set on msg.ID for your reference. msg.Values is also required.
9090
func (p *Producer) Enqueue(ctx context.Context, msg *Message) error {
9191
maxLen := cmp.Or(msg.StreamMaxLength, p.options.StreamMaxLength)
92-
minId := cmp.Or(msg.StreamMinID, p.options.StreamMinID)
92+
minID := cmp.Or(msg.StreamMinID, p.options.StreamMinID)
9393
if maxLen > 0 {
94-
minId = ""
94+
minID = ""
9595
}
9696

9797
args := &redis.XAddArgs{
9898
ID: msg.ID,
9999
Stream: msg.Stream,
100100
Values: msg.Values,
101101
MaxLen: maxLen,
102-
MinID: minId,
102+
MinID: minID,
103103
Approx: p.options.UseApproximate,
104104
Limit: cmp.Or(msg.TrimLimit, p.options.TrimLimit),
105105
}

0 commit comments

Comments
 (0)