【发布时间】:2018-07-02 03:58:33
【问题描述】:
我正在阅读有关AWS Kinesis 的信息。在下面的程序中,我将数据写入名为TestStream 的流中。我将这段代码运行了 10 次,将 10 条记录插入到流中。
var params = {
Data: 'More Sample data into the test stream ...',
PartitionKey: 'TestKey_1',
StreamName: 'TestStream'
};
kinesis.putRecord(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
});
所有记录均已成功插入。 partition key 在这里的真正含义是什么?它在后台做什么?我读了它的documentation,但不明白它的意思。
【问题讨论】:
标签: node.js amazon-web-services stream amazon-kinesis