如何配置 Elasticsearch 以从 Amazon SQS 拉取消息

How to configure Elasticsearch to pull messages from Amazon SQS

在我当前的场景中,我在 ubuntu 14.04 机器上使用 ElasticSearch,在队列中保存一些“.json”消息的亚马逊 SQS 队列。我想通过 ES 从亚马逊 SQS 中提取消息,以便它可以使用 .json 消息对其进行索引。

我应该寻找什么,我应该如何进行?我正在寻找 python 的 boto 代码行中的内容。

注意:我对为此使用 logstash 不感兴趣

Amazon SQS 提供 API 来接收消息:http://docs.aws.amazon.com/AWSSimpleQueueService/latest/SQSGettingStartedGuide/ReceiveMessage.html

ElasticSearch 提供了一个 API 来索引消息: https://www.elastic.co/guide/en/elasticsearch/client/java-api/current/index-doc.html

我不确定 ES 是否可以自动接收来自 SQS 的消息,但一个可行的解决方案是在 SQS 和 ES 之间建立一个简单的代理来接收和索引。