我,我有消费方法,如:
private def consume(queueUrl: String) =
SqsStream(
queueUrl,
SqsStreamSettings(
stopWhenQueueEmpty = false,
waitTimeSeconds = Some(3),
visibilityTimeout = Some(sqsConfig.visibilityTimeout),
autoDelete = false,
messageAttributeNames = List("TEST", AWSTraceHeader.unwrap.toString)
)
).mapError(AwsError.fromThrowable)
我向队列发送消息:
aws sqs 发送消息 --endpoint-url "https://sqs.eu-west-2.amazonaws.com/666" --queue-url "https://sqs.eu-west-2.amazonaws.com /666/queue-name" --message-body '{ "event_type": "create", "user_id": "666" }' --message-attributes "AWSTraceHeader={StringValue=TestTenant,DataType=String}"
和 message.attributes 给了我一张空地图..我做错了什么?谢谢!