0
我試圖從隊列中獲取消息的總數,但可獲取的屬性此NumberOfMessagesSent和NumberOfMessagesReceived亞馬遜SQS蒙山節點
var params = {
QueueUrl: 'STRING_VALUE', // required
AttributeNames: [
'Policy | VisibilityTimeout | MaximumMessageSize | MessageRetentionPeriod | ApproximateNumberOfMessages | ApproximateNumberOfMessagesNotVisible | CreatedTimestamp | LastModifiedTimestamp | QueueArn | ApproximateNumberOfMessagesDelayed | DelaySeconds | ReceiveMessageWaitTimeSeconds | RedrivePolicy',
// ... more items ...
]
};
sqs.getQueueAttributes(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
我怎麼能得到NumberOfMessagesSent和NumberOfMessagesReceived?