From 4b27afe176645be853433e2fb6407c2e4324df2f Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Fri, 10 Apr 2020 15:27:47 -0700 Subject: [PATCH] fix sqs message reading --- weed/replication/sub/notification_aws_sqs.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/weed/replication/sub/notification_aws_sqs.go b/weed/replication/sub/notification_aws_sqs.go index 06869e619..1dd386ba7 100644 --- a/weed/replication/sub/notification_aws_sqs.go +++ b/weed/replication/sub/notification_aws_sqs.go @@ -92,7 +92,9 @@ func (k *AwsSqsInput) ReceiveMessage() (key string, message *filer_pb.EventNotif } // process the message - key = *result.Messages[0].Attributes["key"] + // fmt.Printf("messages: %+v\n", result.Messages[0]) + keyValue := result.Messages[0].MessageAttributes["key"] + key = *keyValue.StringValue text := *result.Messages[0].Body message = &filer_pb.EventNotification{} err = proto.UnmarshalText(text, message)