Skip to content

Let’s say you have an ElasticSearch Index of 1,000,000 documents and you need to run some operation on those documents.

Notifications You must be signed in to change notification settings

ehsaniara/es-kafka-pagination

Repository files navigation

ElasticSearch Pagination by using Kafka

ES-Kafka

Start

Let's first start the ElasticSearch in docker:

docker-compose -f docker-compose-es.yml up -d

Then start your kafka cluster

docker-compose -f docker-compose-kafka.yml up -d

This is just a simple example for kafka docker-compose

Now you can start the application, you can check it by calling localhost:8080 from your browser.

Let's insert some dummy data in your index, by running following line after you start the application. (100K documents)

curl http://localhost:8080/test/init

Start the pagination by calling the kafka producer

curl http://localhost:8080/test

If you check the application log you ll notice the asynchronous call into ElasticSearch by multiple consumers.

About

Let’s say you have an ElasticSearch Index of 1,000,000 documents and you need to run some operation on those documents.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages