Files
spring-cloud-stream-samples/tools/kafka/docker-compose

== Docker Compose scripts for Kafka

=== Kafka Cluster
Runs a multi-node Kafka cluster w/ 3 brokers available at `locahost:9091,localhost:9092,localhost:9093`.

To start the brokers run the following command:
[source,shell]
----
docker-compose -f ./kafka-cluster.yml -d up
----
To stop the brokers run the following command:
[source,shell]
----
docker-compose -f ./kafka-cluster.yml down
----

TIP: To start the containers in the foreground simply add `-d` to the start command. To stop containers that are running in the foreground simple issue `CTRL-C` command.


=== Control Center UI
Runs a https://docs.confluent.io/platform/current/control-center/index.html[Confluent Control Center] that exposes a UI at http://locahost:9021.

NOTE: It is expected that the brokers are already running

To start the Control Center run the following command:
[source,shell]
----
docker-compose -f ./control-center-ui.yml up
----
To stop the Control Center run the following command:
[source,shell]
----
docker-compose -f ./control-center-ui.yml down
----

TIP: The scripts can be chained together to start both cluster and UI in a single command
[source,shell]
----
docker-compose -f kafka-cluster.yml -f ./control-center-ui.yml up`
----