# Command Line Tools

## Download Apache Kafka Binary Package

1. Download the [kafka_2.13-2.6.1.tgz binary package](https://archive.apache.org/dist/kafka/2.6.1/kafka_2.13-2.6.1.tgz).

2. Decompress

    ```shell
    tar -xzvf kafka_2.13-2.6.1.tgz
    ```

3. Enter the command line directory

    ```shell
    cd kafka_2.13-2.6.1/bin
    ```

## Basic Operations

> 1. Please first create a Topic: `test-topic` on the console, refer to: [Topic Creation](/docs/ukafka/guide/topic/create)
> 2. In actual execution, please replace the following address with the access address of your UKafka cluster, refer to: [View Access Point](/docs/ukafka/guide/cluster/address).

- Topic List

```shell
./kafka-topics.sh --bootstrap-server 10.9.188.159:9092 --list
```

<!-- image-todo -->

- View Topic Details

```shell
./kafka-topics.sh --bootstrap-server 10.9.188.159:9092 --describe --topic test-topic
```

<!-- image-todo -->

- Send Message

```shell
./kafka-console-producer.sh --bootstrap-server 10.9.188.159:9092 --topic test-topic
```

<!-- image-todo -->

- Receive Message

```shell
./kafka-console-consumer.sh --bootstrap-server 10.9.188.159:9092 --topic test-topic --group test-group --from-beginning
```

<!-- image-todo -->

- Consumer Group List

> Do not exit the receive message command, open another terminal and execute the following command

```shell
./kafka-consumer-groups.sh --bootstrap-server 10.9.188.159:9092 --list
```

<!-- image-todo -->

- Consumer Group Details

```shell
./kafka-consumer-groups.sh --bootstrap-server 10.9.188.159:9092 --describe --group test-group
```

<!-- image-todo -->

- Delete Consumer Group

```shell
./kafka-consumer-groups.sh --bootstrap-server 10.9.188.159:9092 --delete --group test-group
```

<!-- image-todo -->
