<commit_before>---
post_title: Quick Start
menu_order: 0
feature_maturity: preview
enterprise: 'no'
---











1. Install a Kafka cluster. If you are using open source DC/OS, install a Kafka cluster with the following command from the DC/OS CLI. If you are using Enterprise DC/OS, you may need to follow additional instructions. See the Install and Customize section for more information.
    
        $ dcos package install kafka
        

1. Create a new topic.
    
        $ dcos kafka topic create topic1
        

1. Find connection information.
    
        $ dcos kafka connection
        {
            "address": [
                "10.0.0.211:9843",
                "10.0.0.217:10056",
                "10.0.0.214:9689"
            ],
            "dns": [
                "broker-0.kafka.mesos:9843",
                "broker-1.kafka.mesos:10056",
                "broker-2.kafka.mesos:9689"
            ],
            "vip": "broker.kafka.l4lb.thisdcos.directory:9092",
            "zookeeper": "master.mesos:2181/dcos-service-kafka"
        }
        

1. Produce and consume data.
    
        $ dcos node ssh --master-proxy --leader
        
        core@ip-10-0-6-153 ~ $ docker run -it mesosphere/kafka-client
        
        root@7d0aed75e582:/bin# echo "Hello, World." | ./kafka-console-producer.sh --broker-list 10.0.0.211:9843, 10.0.0.217:10056, 10.0.0.214:9689 --topic topic1
        
        root@7d0aed75e582:/bin# ./kafka-console-consumer.sh --zookeeper master.mesos:2181/kafka --topic topic1 --from-beginning
        Hello, World.
        

See also [Connecting clients][1].

 [1]: https://docs.mesosphere.com/1.8/usage/service-guides/kafka/connecting-clients
<commit_msg>Fixed/improved quickstart example. (#316)<commit_after>---
post_title: Quick Start
menu_order: 0
feature_maturity: preview
enterprise: 'no'
---











1. Install a Kafka cluster. If you are using open source DC/OS, install a Kafka cluster with the following command from the DC/OS CLI. If you are using Enterprise DC/OS, you may need to follow additional instructions. See the Install and Customize section for more information.
    
        $ dcos package install kafka
        

1. Create a new topic.
    
        $ dcos kafka topic create topic1
        

1. Find connection information.
    
        $ dcos kafka connection
        {
            "address": [
                "10.0.0.211:9843",
                "10.0.0.217:10056",
                "10.0.0.214:9689"
            ],
            "dns": [
                "broker-0.kafka.mesos:9843",
                "broker-1.kafka.mesos:10056",
                "broker-2.kafka.mesos:9689"
            ],
            "vip": "broker.kafka.l4lb.thisdcos.directory:9092",
            "zookeeper": "master.mesos:2181/dcos-service-kafka"
        }
        

1. Produce and consume data.
    
        $ dcos node ssh --master-proxy --leader
        
        core@ip-10-0-6-153 ~ $ docker run -it mesosphere/kafka-client
        
        root@7<PASSWORD>2:/bin# echo "Hello, World." | ./kafka-console-producer.sh --broker-list broker-0.kafka.mesos:9843, broker-1.kafka.mesos:10056, broker-2.kafka.mesos:9689 --topic topic1
        
        root@7<PASSWORD>2:/bin# ./kafka-console-consumer.sh --zookeeper master.mesos:2181/dcos-service-kafka --topic topic1 --from-beginning
        Hello, World.
        

See also [Connecting clients][1].

 [1]: https://docs.mesosphere.com/1.8/usage/service-guides/kafka/connecting-clients

{'fraction_non_alphanumeric': 0.11840968020743302, 'fraction_numerical': 0.06770383174877558, 'mean_word_length': 1.8741721854304636, 'pattern_counts': {'":': 8, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 9, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '69491', 'n_tokens_mistral': 1262, 'n_tokens_neox': 1128, 'n_words': 263}