{"id":548,"date":"2016-02-08T23:54:04","date_gmt":"2016-02-08T23:54:03","guid":{"rendered":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/"},"modified":"2016-02-08T23:54:04","modified_gmt":"2016-02-08T23:54:03","slug":"getting-started-with-kafka-and-couchbase-as-an-endpoint","status":"publish","type":"post","link":"https:\/\/www.couchbase.com\/blog\/es\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/","title":{"rendered":"Getting started with Kafka and Couchbase as an endpoint"},"content":{"rendered":"<p>Couchbase is great as a source for Apache Kafka using the DCP connector.<br>\nHowever it is also great as an endpoint for digesting data, as it is fast, memory first and reliable storage.<\/p>\n\n\n\n<p>In this blog post I will show you how to build simple Java application for a producer and a consumer which save the published messages from Kafka into Couchbase.<\/p>\n\n\n\n<p>I assume here, that you already have a Kafka cluster (even if it&#8217;s single node cluster). If not, try to follow that installation guide.<\/p>\n\n\n\n<p>This blog environment have 4 parts:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Kafka producer<\/li>\n\n\n<li>Apache Kafka queue<\/li>\n\n\n<li>Kafka consumer<\/li>\n\n\n<li>Couchbase server<\/li>\n\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">Producer<\/h2>\n\n\n\n<p>We need the producer in order to submit messages to our queue.<\/p>\n\n\n\n<p>In the queue, those messages are being digested and every application which subscribed to the topic &#8211; can read those messages.<\/p>\n\n\n\n<p>The source of our messages will be a dummy JSON file I&#8217;ve created using Mockaroo, which we will split and sent to the queue.<\/p>\n\n\n\n<p>Our sample JSON data looks something similar to:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>{   \r\n   &quot;id&quot;:1,  \r\n   &quot;gender&quot;:&quot;Female&quot;,  \r\n   &quot;first_name&quot;:&quot;Jane&quot;,  \r\n   &quot;last_name&quot;:&quot;Holmes&quot;,  \r\n   &quot;email&quot;:&quot;jholmes0@myspace.com&quot;,  \r\n   &quot;ip_address&quot;:&quot;230.49.112.20&quot;,  \r\n   &quot;city&quot;:&quot;Houston&quot;  \r\n }  <\/code><\/pre>\n\n\n\n<p>The producer code:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import com.fasterxml.jackson.databind.JsonNode;  \r\n import com.fasterxml.jackson.databind.ObjectMapper;  \r\n import com.fasterxml.jackson.databind.node.ArrayNode;  \r\n import org.apache.kafka.clients.producer.KafkaProducer;  \r\n import org.apache.kafka.clients.producer.ProducerConfig;  \r\n import org.apache.kafka.clients.producer.ProducerRecord;  \r\n import org.apache.kafka.clients.producer.RecordMetadata;  \r\n   \r\n import java.io.File;  \r\n import java.nio.charset.Charset;  \r\n import java.nio.file.Files;  \r\n import java.nio.file.Paths;  \r\n import java.util.ArrayList;  \r\n import java.util.HashMap;  \r\n import java.util.List;  \r\n import java.util.Map;  \r\n import java.util.concurrent.Future;  \r\n   \r\n   \r\n public class KafkaSimpleProducer {  \r\n   public static void main(String[] args) throws Exception {  \r\n     Map&lt;String, Object&gt; config = new HashMap&lt;&gt;();  \r\n     config.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, &quot;localhost:9092&quot;);  \r\n     config.put(&quot;value.serializer&quot;, &quot;org.apache.kafka.common.serialization.StringSerializer&quot;);  \r\n     config.put(&quot;key.serializer&quot;, &quot;org.apache.kafka.common.serialization.StringSerializer&quot;);  \r\n     KafkaProducer&lt;String, String&gt; producer = new KafkaProducer&lt;String, String&gt;(config);  \r\n   \r\n     File input = new File(&quot;sampleJsonData.json&quot;);  \r\n     byte[] encoded = Files.readAllBytes(Paths.get(input.getPath()  ));  \r\n   \r\n     String jsons = new String(encoded, Charset.defaultCharset());  \r\n     System.out.println(&quot;Splitting file to jsons....&quot;);  \r\n   \r\n     List splittedJsons = split(jsons);  \r\n\r\n     System.out.println(&quot;Converting to JsonDocuments....&quot;);  \r\n   \r\n     int docCount = splittedJsons.size();  \r\n   \r\n     System.out.println(&quot;Number of documents is: &quot; + docCount );  \r\n   \r\n     System.out.println(&quot;Starting sending msg to kafka....&quot;);  \r\n     int count = 0;  \r\n     for ( String doc : splittedJsons) {  \r\n       System.out.println(&quot;sending msg....&quot; + count);  \r\n       ProducerRecord&lt;String,String&gt; record = new ProducerRecord&lt;&gt;( &quot;couchbaseTopic&quot;, doc );  \r\n       Future meta = producer.send(record);  \r\n       System.out.println(&quot;msg sent....&quot; + count);  \r\n   \r\n       count++;  \r\n     }  \r\n   \r\n     System.out.println(&quot;Total of &quot; + count + &quot; messages sent&quot;);  \r\n   \r\n     producer.close();  \r\n   }  \r\n\r\n   public static List split(String jsonArray) throws Exception {  \r\n     List splittedJsonElements = new ArrayList();  \r\n     ObjectMapper jsonMapper = new ObjectMapper();  \r\n     JsonNode jsonNode = jsonMapper.readTree(jsonArray);  \r\n   \r\n     if (jsonNode.isArray()) {  \r\n       ArrayNode arrayNode = (ArrayNode) jsonNode;  \r\n       for (int i = 0; i &lt; arrayNode.size(); i++) {  \r\n         JsonNode individualElement = arrayNode.get(i);  \r\n         splittedJsonElements.add(individualElement.toString());  \r\n       }  \r\n     }  \r\n     return splittedJsonElements;  \r\n   }  \r\n }  \r\n   <\/code><\/pre>\n\n\n\n<figure style=\"width: 400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/screen-shot-2016-02-04-at-14.53.04.png\" alt=\"Output from the Kafka producer app\" width=\"400\" height=\"252\"><figcaption class=\"wp-caption-text\">Output from the Kafka producer app<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Consumer<\/h2>\n\n\n\n<p>This is a simple one, very straight forward, just get the messages from the queue, and use the Couchbase Java SDK in order to insert documents into Couchbase. For simplicity, I&#8217;ll be using the sync java SDK, but using the async is totally possible and even recommended.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>import com.couchbase.client.java.Bucket;  \r\n import com.couchbase.client.java.Cluster;  \r\n import com.couchbase.client.java.CouchbaseCluster;  \r\n import com.couchbase.client.java.document.JsonDocument;  \r\n import com.couchbase.client.java.document.json.JsonObject;  \r\n import kafka.consumer.Consumer;  \r\n import kafka.consumer.ConsumerConfig;  \r\n import kafka.consumer.KafkaStream;  \r\n import kafka.javaapi.consumer.ConsumerConnector;  \r\n import kafka.message.MessageAndMetadata;  \r\n   \r\n import java.util.*;  \r\n   \r\n public class KafkaSimpleConsumer {  \r\n   public static void main(String[] args) {  \r\n   \r\n     Properties config = new Properties();  \r\n     config.put(&quot;zookeeper.connect&quot;, &quot;localhost:2181&quot;);  \r\n     config.put(&quot;zookeeper.connectiontimeout.ms&quot;, &quot;10000&quot;);  \r\n     config.put(&quot;group.id&quot;, &quot;default&quot;);  \r\n   \r\n     ConsumerConfig consumerConfig = new kafka.consumer.ConsumerConfig(config);  \r\n   \r\n     ConsumerConnector consumerConnector = Consumer.createJavaConsumerConnector(consumerConfig);  \r\n   \r\n     Map&lt;String, Integer&gt; topicCountMap = new HashMap&lt;&gt;();  \r\n     topicCountMap.put(&quot;couchbaseTopic&quot;, 1);  \r\n   \r\n     Map&lt;String, List&lt;KafkaStream&lt;byte[], byte[]&gt;&gt;&gt; consumerMap = consumerConnector.createMessageStreams(topicCountMap);  \r\n   \r\n     List&lt;KafkaStream&lt;byte[], byte[]&gt;&gt; streams = consumerMap.get(&quot;couchbaseTopic&quot;);  \r\n   \r\n     List nodes = new ArrayList&lt;&gt;();  \r\n     nodes.add(&quot;localhost&quot;);  \r\n   \r\n     Cluster cluster = CouchbaseCluster.create(nodes);  \r\n     final Bucket bucket = cluster.openBucket(&quot;kafkaExample&quot;);  \r\n   \r\n     try {  \r\n       for (final KafkaStream&lt;byte[], byte[]&gt; stream : streams) {  \r\n         for (MessageAndMetadata&lt;byte[], byte[]&gt; msgAndMetaData : stream) {  \r\n           String msg = convertPayloadToString(msgAndMetaData.message());  \r\n           System.out.println(msgAndMetaData.topic() + &quot;: &quot; + msg);  \r\n   \r\n           try {  \r\n             JsonObject doc = JsonObject.fromJson(msg);  \r\n             String id = UUID.randomUUID().toString();  \r\n             bucket.upsert(JsonDocument.create(id, doc));  \r\n           } catch (Exception ex) {  \r\n             System.out.println(&quot;Not a json object: &quot; + ex.getMessage());  \r\n           }  \r\n         }  \r\n       }  \r\n     } catch (Exception ex) {  \r\n       System.out.println(&quot;EXCEPTION!!!!&quot; + ex.getMessage());  \r\n       cluster.disconnect();  \r\n     }  \r\n   \r\n     cluster.disconnect();  \r\n   }  \r\n   \r\n   private static String convertPayloadToString(final byte[] message) {  \r\n     String string = new String(message);  \r\n     return string;  \r\n   }  \r\n }  <\/code><\/pre>\n\n\n\n<figure style=\"width: 400px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/screen-shot-2016-02-04-at-14.53.14.png\" alt=\"Output from the Consumer app\" width=\"400\" height=\"241\"><figcaption class=\"wp-caption-text\">Our Kafka consumer console output<\/figcaption><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">Couchbase Server<\/h2>\n\n\n\n<p>Now we can look on the result in Couchbase server.<\/p>\n\n\n\n<p>Look at kafkaExample bucket &#8211; Filled with 1000 documents.<\/p>\n\n\n\n<figure style=\"width: 640px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/screen-shot-2016-02-04-at-14.51.40.png\" alt=\"\" width=\"640\" height=\"141\"><figcaption class=\"wp-caption-text\">Couchbase buckets<\/figcaption><\/figure>\n\n\n\n<p>Each document looks something like that:<\/p>\n\n\n\n<figure style=\"width: 640px\" class=\"wp-caption aligncenter\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.couchbase.com\/wp-content\/uploads\/sites\/5\/2026\/05\/screen-shot-2016-02-04-at-14.52.04.png\" alt=\"\" width=\"640\" height=\"139\"><figcaption class=\"wp-caption-text\">Sample document<\/figcaption><\/figure>\n\n\n\n<p>Simple 3 part solution.<\/p>\n\n\n\n<p>Note, that on a Production environment, Producer, Consumer, Kafka or Couchbase will be on or more machines each.<\/p>\n\n\n\n<p>Full (including Maven dependencies) code in <a href=\"https:\/\/github.com\/roikatz\/kafka-consumer-couchbase\">GitHub<\/a>.<\/p>\n\n\n\n<p>Roi.<\/p>","protected":false},"excerpt":{"rendered":"<p>Couchbase is great as a source for Apache Kafka using the DCP connector. However it is also great as an endpoint for digesting data, as it is fast, memory first and reliable storage. In this blog post I will show you how to build simple Java application for a producer and a consumer which save [&hellip;]<\/p>\n","protected":false},"author":64,"featured_media":18,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"inline_featured_image":false,"footnotes":""},"categories":[136,178,144],"tags":[],"ppma_author":[172],"class_list":["post-548","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-best-practices-and-tutorials","category-connectors","category-java"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.6 (Yoast SEO v27.6) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Getting started with Kafka and Couchbase as an endpoint<\/title>\n<meta name=\"description\" content=\"Getting started with Apache Kafka and Couchbase. Use Couchbase easily as the target, and use a Kafka consumer to insert data into your Couchbase database.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.couchbase.com\/blog\/es\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/\" \/>\n<meta property=\"og:locale\" content=\"es_MX\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Getting started with Kafka and Couchbase as an endpoint\" \/>\n<meta property=\"og:description\" content=\"Getting started with Apache Kafka and Couchbase. Use Couchbase easily as the target, and use a Kafka consumer to insert data into your Couchbase database.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.couchbase.com\/blog\/es\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/\" \/>\n<meta property=\"og:site_name\" content=\"The Couchbase Blog\" \/>\n<meta property=\"article:published_time\" content=\"2016-02-08T23:54:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1800\" \/>\n\t<meta property=\"og:image:height\" content=\"630\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Roi Katz, Solution Architect, Couchbase\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Roi Katz, Solution Architect, Couchbase\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutos\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/\"},\"author\":{\"name\":\"Roi Katz, Solution Architect, Couchbase\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/8e452408f0a3793ded90eea9263a264e\"},\"headline\":\"Getting started with Kafka and Couchbase as an endpoint\",\"datePublished\":\"2016-02-08T23:54:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/\"},\"wordCount\":323,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"articleSection\":[\"Best Practices and Tutorials\",\"Connectors\",\"Java\"],\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/\",\"name\":\"Getting started with Kafka and Couchbase as an endpoint\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"datePublished\":\"2016-02-08T23:54:03+00:00\",\"description\":\"Getting started with Apache Kafka and Couchbase. Use Couchbase easily as the target, and use a Kafka consumer to insert data into your Couchbase database.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#breadcrumb\"},\"inLanguage\":\"es\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/05\\\/couchbase-nosql-dbaas.png\",\"width\":1800,\"height\":630},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/getting-started-with-kafka-and-couchbase-as-an-endpoint\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Getting started with Kafka and Couchbase as an endpoint\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"name\":\"The Couchbase Blog\",\"description\":\"Couchbase, the NoSQL Database\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"es\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#organization\",\"name\":\"The Couchbase Blog\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"contentUrl\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/wp-content\\\/uploads\\\/sites\\\/5\\\/2026\\\/06\\\/logo.svg\",\"width\":\"1024\",\"height\":\"1024\",\"caption\":\"The Couchbase Blog\"},\"image\":{\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/#\\\/schema\\\/person\\\/8e452408f0a3793ded90eea9263a264e\",\"name\":\"Roi Katz, Solution Architect, Couchbase\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"es\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a22c6493bc51fd783319cc905789337f163df1de53c7bad6d769c9560be0ba3c?s=96&d=mm&r=g5eb805f4c05de24c77c276f241a51b53\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a22c6493bc51fd783319cc905789337f163df1de53c7bad6d769c9560be0ba3c?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a22c6493bc51fd783319cc905789337f163df1de53c7bad6d769c9560be0ba3c?s=96&d=mm&r=g\",\"caption\":\"Roi Katz, Solution Architect, Couchbase\"},\"description\":\"Roi is a Couchbase Solution Architect, software developer and architect with over 10 years of broad industry experience. He has been a trainer and author of courses with a specialization in Big Data Systems, NoSQL Databases, Couchbase, Distributed Architecture and Cloud Computing.\",\"url\":\"https:\\\/\\\/www.couchbase.com\\\/blog\\\/es\\\/author\\\/roi-katz\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Getting started with Kafka and Couchbase as an endpoint","description":"Getting started with Apache Kafka and Couchbase. Use Couchbase easily as the target, and use a Kafka consumer to insert data into your Couchbase database.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.couchbase.com\/blog\/es\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/","og_locale":"es_MX","og_type":"article","og_title":"Getting started with Kafka and Couchbase as an endpoint","og_description":"Getting started with Apache Kafka and Couchbase. Use Couchbase easily as the target, and use a Kafka consumer to insert data into your Couchbase database.","og_url":"https:\/\/www.couchbase.com\/blog\/es\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/","og_site_name":"The Couchbase Blog","article_published_time":"2016-02-08T23:54:03+00:00","og_image":[{"width":1800,"height":630,"url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","type":"image\/png"}],"author":"Roi Katz, Solution Architect, Couchbase","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Roi Katz, Solution Architect, Couchbase","Est. reading time":"5 minutos"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#article","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/"},"author":{"name":"Roi Katz, Solution Architect, Couchbase","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/8e452408f0a3793ded90eea9263a264e"},"headline":"Getting started with Kafka and Couchbase as an endpoint","datePublished":"2016-02-08T23:54:03+00:00","mainEntityOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/"},"wordCount":323,"commentCount":0,"publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","articleSection":["Best Practices and Tutorials","Connectors","Java"],"inLanguage":"es","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/","url":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/","name":"Getting started with Kafka and Couchbase as an endpoint","isPartOf":{"@id":"https:\/\/www.couchbase.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#primaryimage"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#primaryimage"},"thumbnailUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","datePublished":"2016-02-08T23:54:03+00:00","description":"Getting started with Apache Kafka and Couchbase. Use Couchbase easily as the target, and use a Kafka consumer to insert data into your Couchbase database.","breadcrumb":{"@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#breadcrumb"},"inLanguage":"es","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/"]}]},{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#primaryimage","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/05\/couchbase-nosql-dbaas.png","width":1800,"height":630},{"@type":"BreadcrumbList","@id":"https:\/\/www.couchbase.com\/blog\/getting-started-with-kafka-and-couchbase-as-an-endpoint\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.couchbase.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Getting started with Kafka and Couchbase as an endpoint"}]},{"@type":"WebSite","@id":"https:\/\/www.couchbase.com\/blog\/#website","url":"https:\/\/www.couchbase.com\/blog\/","name":"The Couchbase Blog","description":"Couchbase, the NoSQL Database","publisher":{"@id":"https:\/\/www.couchbase.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.couchbase.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"es"},{"@type":"Organization","@id":"https:\/\/www.couchbase.com\/blog\/#organization","name":"The Couchbase Blog","url":"https:\/\/www.couchbase.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","contentUrl":"https:\/\/www.couchbase.com\/blog\/wp-content\/uploads\/sites\/5\/2026\/06\/logo.svg","width":"1024","height":"1024","caption":"The Couchbase Blog"},"image":{"@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.couchbase.com\/blog\/#\/schema\/person\/8e452408f0a3793ded90eea9263a264e","name":"Roi Katz, Solution Architect, Couchbase","image":{"@type":"ImageObject","inLanguage":"es","@id":"https:\/\/secure.gravatar.com\/avatar\/a22c6493bc51fd783319cc905789337f163df1de53c7bad6d769c9560be0ba3c?s=96&d=mm&r=g5eb805f4c05de24c77c276f241a51b53","url":"https:\/\/secure.gravatar.com\/avatar\/a22c6493bc51fd783319cc905789337f163df1de53c7bad6d769c9560be0ba3c?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a22c6493bc51fd783319cc905789337f163df1de53c7bad6d769c9560be0ba3c?s=96&d=mm&r=g","caption":"Roi Katz, Solution Architect, Couchbase"},"description":"Roi is a Couchbase Solution Architect, software developer and architect with over 10 years of broad industry experience. He has been a trainer and author of courses with a specialization in Big Data Systems, NoSQL Databases, Couchbase, Distributed Architecture and Cloud Computing.","url":"https:\/\/www.couchbase.com\/blog\/es\/author\/roi-katz\/"}]}},"acf":[],"authors":[{"term_id":172,"user_id":64,"is_guest":0,"slug":"roi-katz","display_name":"Roi Katz, Solution Architect, Couchbase","avatar_url":"https:\/\/secure.gravatar.com\/avatar\/?s=96&d=mm&r=g","0":null,"1":"","2":"","3":"","4":"","5":"","6":"","7":"","8":""}],"_links":{"self":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/548","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/users\/64"}],"replies":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/comments?post=548"}],"version-history":[{"count":0,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/posts\/548\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media\/18"}],"wp:attachment":[{"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/media?parent=548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/categories?post=548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/tags?post=548"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/www.couchbase.com\/blog\/es\/wp-json\/wp\/v2\/ppma_author?post=548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}