Book Image

ElasticSearch Cookbook

By : Alberto Paro
Book Image

ElasticSearch Cookbook

By: Alberto Paro

Overview of this book

Table of Contents (20 chapters)
ElasticSearch Cookbook Second Edition
Credits
About the Author
Acknowledgments
About the Reviewers
www.PacktPub.com
Preface
Index

Using the RabbitMQ river


RabbitMQ is a fast message broker that can handle thousands of messages per second. It can be very handy to use in conjunction with ElasticSearch in order to bulk index the records.

The RabbitMQ river plugin is designed for waiting messages that contain a list of bulk operations. When a new message is delivered to RabbitMQ, it's delivered to ElasticSearch via the plugin to be executed.

Getting ready

You will need a working ElasticSearch cluster and a working RabbitMQ instance installed on the same machine as ElasticSearch.

How to do it...

In order to use the RabbitMQ river, perform the following steps:

  1. First, you need to install the RabbitMQ river plugin, which is available on GitHub (https://github.com/elasticsearch/elasticsearch-river-rabbitmq). You can install the river plugin in the usual way:

    bin/plugin -install elasticsearch/elasticsearch-river-rabbitmq/2.3.0
    
  2. This is how the result should look:

    -> Installing elasticsearch/elasticsearch-river-rabbitmq/2.3.0...
    Trying...