/examples

Apache Kafka and Confluent Platform examples and demos

Primary LanguageTSQLApache License 2.0Apache-2.0

image

Demos

This is a curated list of demos that showcase Apache Kafka® stream processing on the Confluent Platform. Some demos run on local Confluent Platform installs (download Confluent Platform) and others run on Docker (install Docker and Docker Compose).

Where to start

The best demo to start with is cp-demo, which spins up a Kafka event streaming application using KSQL for stream processing. cp-demo also comes with a playbook and video series, and is a great configuration reference for Confluent Platform.

Full demo list

Demo Local Docker Category Description
Avro Y N Confluent Platform Examples of client applications using Avro and Confluent Schema Registry
CDC with MySQL N Y Data Pipelines Self-paced steps to setup a change data capture (CDC) pipeline
CDC with Postgres N Y Data Pipelines Enrich event stream data with CDC data from Postgres and then stream into Elasticsearch
Clickstream Y Y Stream Processing Automated version of the KSQL Clickstream demo
Clients to Cloud Y N Confluent Cloud Examples of client applications in different programming languages connecting to Confluent Cloud
Connect and Kafka Streams Y N Data Pipeline Demonstrate various ways, with and without Kafka Connect, to get data into Kafka topics and then loaded for use by the Kafka Streams API
CP Demo Y Y Confluent Platform Confluent Platform Demo with a playbook for Kafka streaming ETL deployments
CP Quickstart Y Y Confluent Platform Automated version of the Confluent Platform Quickstart
GCP pipeline N Y Data Pipeline Work with Confluent Cloud to build cool pipelines into Google Cloud Platform (GCP)
Hybrid cloud Y Y Confluent Cloud End-to-end demo of a hybrid Kafka Cluster between Confluent Cloud and on-prem using Confluent Replicator
Kinesis to Cloud Y N Confluent Cloud AWS Kinesis -> Confluent Cloud -> Google Cloud Storage pipeline
KSQL UDF Y N Stream Processing Advanced KSQL UDF use case for connected cars
KSQL workshop N Y Stream Processing showcases Kafka stream processing using KSQL and can run self-guided as a KSQL workshop
Microservices ecosystem Y N Stream Processing Microservices Orders Demo Application integrated into the Confluent Platform
MQTT Y N Data Pipeline Internet of Things (IoT) integration example using Apache Kafka + Kafka Connect + MQTT Connector + Sensor Data
Multi datacenter N Y Confluent Platform This demo deploys an active-active multi-datacenter design, with two instances of Confluent Replicator copying data bidirectionally between the datacenters
Music demo Y Y Stream Processing KSQL version of the Kafka Streams Demo Application
MySQL and Debezium Y Y Data Pipelines End-to-end streaming ETL with KSQL for stream processing using the Debezium Connector for MySQL
Oracle, KSQL, Elasticsearch N Y Data Pipelines Stream data from Oracle, enrich and filter with KSQL, and then stream into Elasticsearch
Syslog N Y Data Pipelines Real-time syslog processing with Apache Kafka and KSQL: filtering logs, event-driven alerting, enriching events

Prerequisites

For local installs:

  • Confluent Platform 5.2
  • Env var CONFLUENT_HOME=/path/to/confluentplatform
  • Env var PATH includes $CONFLUENT_HOME/bin
  • Each demo has its own set of prerequisites as well, documented in each demo's README

For Docker:

  • Docker version 17.06.1-ce
  • Docker Compose version 1.14.0 with Docker Compose file format 2.1

Next steps

As a next step, you may want to launch just the services in Confluent Platform with no pre-configured connectors, data sources, topics, schemas, etc. Then you can manually configure any connectors or applications that you want to use.

We have several resources for this purpose:

  • cp-all-in-one: this Docker Compose file launches all services in Confluent Platform, and runs them in containers in your local host.
  • cp-all-in-one-cloud: use this with your pre-configured Confluent Cloud instance. This Docker Compose file launches all services in Confluent Platform (except for the Kafka brokers), runs them in containers in your local host, and automatically configures them to connect to Confluent Cloud.
  • Confluent CLI: for local, non-Docker installs of Confluent Platform. This CLI launches all services in Confluent Platform, and runs them on your local host.
  • Generate test data: Hello world for launching Confluent Platform, plus different ways to generate more interesting test data for your topics

Additional documentation: Getting Started