# Continuously streaming documents out of ElasticSearch using Spark Streaming

**URL:** <https://discuss.elastic.co/t/continuously-streaming-documents-out-of-elasticsearch-using-spark-streaming/147>\
**Category:** Elasticsearch\
**Created:** [May 4, 2015, 7:47pm UTC](https://discuss.elastic.co/t/continuously-streaming-documents-out-of-elasticsearch-using-spark-streaming/147 "2015-05-04T19:47:53Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mans4singh](https://avatars.discourse-cdn.com/v4/letter/m/a183cd/32.png) [@mans4singh](https://discuss.elastic.co/u/mans4singh)\
**Post date:** [May 4, 2015, 7:47pm UTC](https://discuss.elastic.co/t/continuously-streaming-documents-out-of-elasticsearch-using-spark-streaming/147/1 "2015-05-04T19:47:53Z")

</div>

Hi:

Is there a way to continuously stream data out of elastic search using spark streaming ? I've taken a look at the documentation ([http://www.elastic.co/guide/en/elasticsearch/hadoop/master/spark.html](http://www.elastic.co/guide/en/elasticsearch/hadoop/master/spark.html)) which has an example of a query and apparently uses spark context (not spark streaming context). The document states that it will stream all documents from es based on the query, but i am looking for continuous streaming of out elastic search.

Thanks

---

<div class="post-metadata">

**Author:** ![cdugz](https://avatars.discourse-cdn.com/v4/letter/c/2acd7d/32.png) [@cdugz](https://discuss.elastic.co/u/cdugz)\
**Post date:** [August 2, 2016, 11:15am UTC](https://discuss.elastic.co/t/continuously-streaming-documents-out-of-elasticsearch-using-spark-streaming/147/2 "2016-08-02T11:15:14Z")

</div>

Hi, the only way to stream out changes from ES cluster is changes feed plugin, and it works. I have created mini-documentation how to achieve uni-directional streaming replication between 2 ES clusters, separated by high-latency network

> **[cdgz/es-replication](https://github.com/cdgz/es-replication)**
>
> es-replication - Elasticsearch streaming replication

The only tools used: changes feed plugin, fluentd with some custom plugins I wrote (you actually don't need anything else)

Good luck

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 5, 2017, 10:30pm UTC](https://discuss.elastic.co/t/continuously-streaming-documents-out-of-elasticsearch-using-spark-streaming/147/3 "2017-07-05T22:30:51Z")

</div>


