Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/amazon-web-services/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Amazon web services Kinesis客户端库:流的多个工作者_Amazon Web Services_Amazon Kinesis - Fatal编程技术网

Amazon web services Kinesis客户端库:流的多个工作者

Amazon web services Kinesis客户端库:流的多个工作者,amazon-web-services,amazon-kinesis,Amazon Web Services,Amazon Kinesis,我有一个.war,其中我们有一个Kinesis应用程序,它处理一个包含单个碎片的流。我们在生产中部署了两个战争实例。结果,我会有两个工人在一个流上用一个碎片工作。处理这个问题的推荐方法是什么?我试着在我的dev机器上本地部署两个war,从每个记录只被处理一次的意义上来说,这似乎很好。我知道AWS建议每个碎片使用一个实例。从他们的文档中: Typically, when you use the KCL, you should ensure that the number of instances

我有一个.war,其中我们有一个Kinesis应用程序,它处理一个包含单个碎片的流。我们在生产中部署了两个战争实例。结果,我会有两个工人在一个流上用一个碎片工作。处理这个问题的推荐方法是什么?我试着在我的dev机器上本地部署两个war,从每个记录只被处理一次的意义上来说,这似乎很好。我知道AWS建议每个碎片使用一个实例。从他们的文档中:

Typically, when you use the KCL, you should ensure that the number of instances does not exceed the number of shards (except for failure standby purposes). Each shard is processed by exactly one KCL worker and has exactly one corresponding record processor, so you never need multiple instances to process one shard.

你可能大部分时间都很好。 KCL将为您处理此问题

本例中,您希望检查一名工人是否在处理某些记录后,但在检查点之前死亡。在这种情况下,接管的工作人员将重新处理一些记录(来自最后一个检查点)。 您的应用程序能否处理记录的重新处理

见: