Skip to content

Multiple topics to be created - how? #1

@chainhead

Description

@chainhead

I have a script topics.sh that looks like this:

kafka-topics.sh \
  --bootstrap-server ${KAFKA_BROKER} \
  --create --if-not-exists \
  --topic ${ID}_data   \
  --replication-factor ${REPLICATION_FACTOR} \
  --partitions ${PARTITION_COUNT}
kafka-topics.sh \
  --bootstrap-server ${KAFKA_BROKER} \
  --create --if-not-exists \
  --topic ${ID}_alerts  \
  --replication-factor ${REPLICATION_FACTOR} \
  --partitions ${PARTITION_COUNT}
# and around a dozen more...

How do I feed the above script in a Docker compose project YAML file?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions