# Datagen container vs datagen source connector

**URL:** <https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638>\
**Category:** Containers\
**Created:** [2 September 2021 14:11 UTC](https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638 "2021-09-02T14:11:24Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [2 September 2021 14:11 UTC](https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638/1 "2021-09-02T14:11:24Z")

</div>

Hi All

See the newest docker-compose.yml comes with a datagen container, is there a “how to use/manage/configure” this.  
that defines what the different types of data it can generate, and where to send it.  
vs  
@rmoff examples where he goes into source connector configuration to configure datagen.

– assume if you want multiple feeds running at the same time you can start this container multiple times, each with it’s own configuration –

G

---

<div class="post-metadata">

**Author:** ![mitchell-h](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/mitchell-h/32/1129_2.png) [@mitchell-h](https://forum.confluent.io/u/mitchell-h)\
**Post date:** [2 September 2021 14:37 UTC](https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638/2 "2021-09-02T14:37:15Z")

</div>

Could you please post the container name or link the docker-compose you’re referring too? i’m going to assume it’s [GitHub - confluentinc/kafka-connect-datagen: Connector that generates data for demos](https://github.com/confluentinc/kafka-connect-datagen). In that case you find config examples at [kafka-connect-datagen/config at master · confluentinc/kafka-connect-datagen · GitHub](https://github.com/confluentinc/kafka-connect-datagen/tree/master/config) and in the README.md

---

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [2 September 2021 14:39 UTC](https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638/3 "2021-09-02T14:39:06Z")

</div>

will go look at those links, thanks.

newest cp-all-in-one docker-compose.yml

```auto
  ksql-datagen:
    image: confluentinc/ksqldb-examples:6.2.0
    hostname: ksql-datagen
    container_name: ksql-datagen
    depends_on:
      - ksqldb-server
      - broker
      - schema-registry
      - connect
    command: "bash -c 'echo Waiting for Kafka to be ready... && \
                       cub kafka-ready -b broker:29092 1 40 && \
                       echo Waiting for Confluent Schema Registry to be ready... && \
                       cub sr-ready schema-registry 8081 40 && \
                       echo Waiting a few seconds for topic creation to finish... && \
                       sleep 11 && \
                       tail -f /dev/null'"
    environment:
      KSQL_CONFIG_DIR: "/etc/ksql"
      STREAMS_BOOTSTRAP_SERVERS: broker:29092
      STREAMS_SCHEMA_REGISTRY_HOST: schema-registry
      STREAMS_SCHEMA_REGISTRY_PORT: 8081

```

---

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [2 September 2021 15:03 UTC](https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638/4 "2021-09-02T15:03:58Z")

</div>

got the datagen container working, pushing page views to the topic.  
thanks.

started data generation using:

```auto
curl -X POST -H "Content-Type: application/json" --data @config/connector_pageviews.config http://localhost:8083/connectors

```

and view activity

```auto
docker-compose exec connect kafka-console-consumer --topic pageviews --bootstrap-server kafka:29092 --property print.key=true --max-messages 5 --from-beginning

```

how do I stop the connector/data generator from generating data though ?  
I’ve tried just stopping the sql-datagen container and that did not kill the generation.

G

---

<div class="post-metadata">

**Author:** ![georgelza](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/georgelza/32/3026_2.png) [@georgelza](https://forum.confluent.io/u/georgelza)\
**Post date:** [2 September 2021 15:19 UTC](https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638/5 "2021-09-02T15:19:47Z")

</div>

answering own question, I can pause it in the control centre and I can delete it in the control centre also.

G

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex019/uploads/confluentcommunity/original/1X/c49438c90c9df282e9996fdf6971be890c71b65a.svg) [@system](https://forum.confluent.io/u/system)\
**Post date:** [9 September 2021 15:20 UTC](https://forum.confluent.io/t/datagen-container-vs-datagen-source-connector/2638/6 "2021-09-09T15:20:20Z")

</div>

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.
