Skip to content

Commit 6976172

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

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

message.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ type Message struct {
77
ID string
88
Stream string
99
StreamMaxLength int64
10-
StreamMinId string
10+
StreamMinID string
1111
TrimLimit int64
1212
Values map[string]interface{}
1313
}

producer.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ type ProducerOptions struct {
1919
// More info here: https://redis.io/commands/xadd#capped-streams.
2020
StreamMaxLength int64
2121

22-
// StreamMinId sets the minimum ID that will be used when calling XADD. This
22+
// StreamMinID sets the minimum ID that will be used when calling XADD. This
2323
// is useful when you want to ensure that the stream is trimmed to a certain
2424
// point. More info here: https://redis.io/commands/xadd#capped-streams.
25-
StreamMinId string
25+
StreamMinID string
2626

2727
// UseApproximate determines whether to use the ~ with the MAXLEN and MINID
2828
// option. This allows the stream trimming to done in a more efficient
@@ -89,7 +89,7 @@ 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 {
9494
minId = ""
9595
}

0 commit comments

Comments
 (0)