Skip to content

Commit

Permalink
🩹 Add id to batch request entry
Browse files Browse the repository at this point in the history
  • Loading branch information
krishnamurthypranesh committed May 6, 2022
1 parent 3043634 commit 1449849
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions publisher/sns/sns.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"github.com/aws/aws-sdk-go/aws/request"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/sns"
"github.com/google/uuid"
)

// sender is the interface to sns.SNS. Its sole purpose is to make
Expand Down Expand Up @@ -94,7 +95,9 @@ func (p *Publisher) PublishBatch(ctx context.Context, msgs []interface{}) error
return err
}

entryId := uuid.New().String()
requestEntry := &sns.PublishBatchRequestEntry{
Id: aws.String(entryId),
Message: aws.String(string(b)),
}

Expand Down

0 comments on commit 1449849

Please sign in to comment.