run_kafka

package
v0.95.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cmd = &cobra.Command{
	Use:   "run-kafka",
	Short: "Run Kafka in Docker (apache/kafka:latest on port 9092)",
	Args:  cobra.NoArgs,
	Run: func(c *cobra.Command, args []string) {
		exec_utils.ExecOut(
			"docker",
			"run",
			"-d",
			"--name", "kafka",
			"-p", "9092:9092",
			"-e", "KAFKA_NODE_ID=1",
			"-e", "KAFKA_PROCESS_ROLES=broker,controller",
			"-e", "KAFKA_LISTENERS=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:9093",
			"-e", "KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://localhost:9092",
			"-e", "KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER",
			"-e", "KAFKA_CONTROLLER_QUORUM_VOTERS=1@localhost:9093",
			"-e", "KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR=1",
			"apache/kafka:latest",
		)
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL