aboutsummaryrefslogtreecommitdiff
path: root/weed/notification/aws_sqs/aws_sqs_pub.go
diff options
context:
space:
mode:
Diffstat (limited to 'weed/notification/aws_sqs/aws_sqs_pub.go')
-rw-r--r--weed/notification/aws_sqs/aws_sqs_pub.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/weed/notification/aws_sqs/aws_sqs_pub.go b/weed/notification/aws_sqs/aws_sqs_pub.go
index f647134c7..c9e674257 100644
--- a/weed/notification/aws_sqs/aws_sqs_pub.go
+++ b/weed/notification/aws_sqs/aws_sqs_pub.go
@@ -70,7 +70,10 @@ func (k *AwsSqsPub) initialize(awsAccessKeyId, awsSecretAccessKey, region, queue
func (k *AwsSqsPub) SendMessage(key string, message proto.Message) (err error) {
- text := proto.MarshalTextString(message)
+ text, err := proto.Marshal(message)
+ if err != nil {
+ return fmt.Errorf("send message marshal %+v: %v", message, err)
+ }
_, err = k.svc.SendMessage(&sqs.SendMessageInput{
DelaySeconds: aws.Int64(10),
@@ -80,7 +83,7 @@ func (k *AwsSqsPub) SendMessage(key string, message proto.Message) (err error) {
StringValue: aws.String(key),
},
},
- MessageBody: aws.String(text),
+ MessageBody: aws.String(string(text)),
QueueUrl: &k.queueUrl,
})