Skip to content

Commit

Permalink
fix readme typo
Browse files Browse the repository at this point in the history
  • Loading branch information
shaiMoria committed Jan 13, 2020
1 parent 6ef408b commit 4f8316a
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions out_sqs.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,8 @@ func FLBPluginFlushCtx(ctx, data unsafe.Pointer, length C.int, tag *C.char) int
MessageCounter++

sqsRecord = &sqs.SendMessageBatchRequestEntry{
Id: aws.String(fmt.Sprintf("MessageNumber-%d", MessageCounter)),
MessageBody: aws.String(recordString),
MessageGroupId: aws.String(sqsConf.queueMessageGroupID),
Id: aws.String(fmt.Sprintf("MessageNumber-%d", MessageCounter)),
MessageBody: aws.String(recordString),
}

if sqsConf.pluginTagAttribute != "" {
Expand All @@ -174,6 +173,10 @@ func FLBPluginFlushCtx(ctx, data unsafe.Pointer, length C.int, tag *C.char) int
}
}

if sqsConf.queueMessageGroupID != "" {
sqsRecord.MessageGroupId = aws.String(sqsConf.queueMessageGroupID)
}

SqsRecords = append(SqsRecords, sqsRecord)

if MessageCounter == 10 {
Expand Down

0 comments on commit 4f8316a

Please sign in to comment.