mirror of
https://github.com/chrislusf/seaweedfs
synced 2024-07-03 23:56:41 +02:00
fix sqs message reading
This commit is contained in:
parent
dce2702e1b
commit
4b27afe176
|
@ -92,7 +92,9 @@ func (k *AwsSqsInput) ReceiveMessage() (key string, message *filer_pb.EventNotif
|
||||||
}
|
}
|
||||||
|
|
||||||
// process the message
|
// 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
|
text := *result.Messages[0].Body
|
||||||
message = &filer_pb.EventNotification{}
|
message = &filer_pb.EventNotification{}
|
||||||
err = proto.UnmarshalText(text, message)
|
err = proto.UnmarshalText(text, message)
|
||||||
|
|
Loading…
Reference in a new issue