The Elasticsearch connector allows moving data from Kafka to Elasticsearch. It writes data from
a topic in Kafka to an `index <https://www.elastic.co/guide/en/elasticsearch/reference/current/_basic_concepts.html#_index>`_
in Elasticsearch and all data for a topic have the same
@@ -26,44 +26,30 @@ connector provides a feature to infer mapping from the schemas of Kafka messages
.. _elasticsearch-quickstart:
Quick start
Quick Start
-----------
This quick start uses the Elasticsearch connector to export data produced by the Avro console
producer to Elasticsearch.
First, start all the necessary services using Confluent CLI:
**Prerequisites:**
.. tip::
- :ref:`Confluent Platform <installation>` is installed and services are running by using the Confluent CLI. This quick start assumes that you are using the Confluent CLI, but standalone installations are also supported. By default ZooKeeper, Kafka, Schema Registry, Kafka Connect REST API, and Kafka Connect are started with the ``confluent start`` command. For more information, see :ref:`installation_archive`.
- Elasticsearch 5.x is installed and running.
If not already in your PATH, add Confluent's ``bin`` directory by running: ``export PATH=<path-to-confluent>/bin:$PATH``
.. important:: Elasticsearch 6.x is not supported at this time due to a known issue.
.. sourcecode:: bash
$ confluent start
----------------------------
Add a Record to the Consumer
----------------------------
Every service will start in order, printing a message with its status:
Start the Avro console producer to import a few records to Kafka:
.. sourcecode:: bash
Starting zookeeper
zookeeper is [UP]
Starting kafka
kafka is [UP]
Starting schema-registry
schema-registry is [UP]
Starting kafka-rest
kafka-rest is [UP]
Starting connect
connect is [UP]
Next, start the Avro console producer to import a few records to Kafka:
@@ -73,19 +59,43 @@ Then in the console producer, type in:
The three records entered are published to the Kafka topic ``test-elasticsearch`` in Avro format.
Before starting the connector, please make sure that the configurations in
``etc/kafka-connect-elasticsearch/quickstart-elasticsearch.properties`` are properly set to your
configurations of Elasticsearch, e.g. ``connection.url`` points to the correct http address.
Then start the Elasticsearch connector by loading its configuration with the following command:
--------------------------------
Load the Elasticsearch Connector
--------------------------------
Load the predefined Elasticsearch connector.
.. tip:: Before starting the connector, you can verify that the configurations in ``etc/kafka-connect-elasticsearch/quickstart-elasticsearch.properties`` are properly set (e.g. ``connection.url`` points to the correct HTTP address).
#. Optional: View the available predefined connectors with this command: