# Looking for example - create topic

**URL:** <https://forum.confluent.io/t/looking-for-example-create-topic/1480>\
**Category:** Non-Java Clients\
**Created:** [14 April 2021 06:39 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480 "2021-04-14T06:39:03Z")\
**Posts on this page:** 9\
**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:** [14 April 2021 06:39 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/1 "2021-04-14T06:39:03Z")

</div>

hi guys.

I’d like to add some code to app, that checks for existence of a topic, if it does not exist it creates it… to my specs.

anyone have example code specifying at basic,  
name, protection level, retention, partitions.

G

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [14 April 2021 08:54 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/2 "2021-04-14T08:54:45Z")

</div>

What language are you working in? Golang? Python? etc.

---

<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:** [14 April 2021 08:56 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/3 "2021-04-14T08:56:11Z")

</div>

oops… this is for golang.

G

---

<div class="post-metadata">

**Author:** ![ybyzek](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/ybyzek/32/70_2.png) [@ybyzek](https://forum.confluent.io/u/ybyzek)\
**Post date:** [14 April 2021 13:34 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/4 "2021-04-14T13:34:44Z")

</div>

If this is for Confluent’s Go client for Apache Kafka® , here is an _Admin Client_ example: [confluent-kafka-go/admin\_create\_topic.go at master · confluentinc/confluent-kafka-go · GitHub](https://github.com/confluentinc/confluent-kafka-go/blob/master/examples/admin_create_topic/admin_create_topic.go)

---

<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:** [14 April 2021 14:12 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/5 "2021-04-14T14:12:31Z")

</div>

awesome, thank you.

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:** [14 April 2021 15:37 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/6 "2021-04-14T15:37:50Z")

</div>

… Request to development…  
when using the CibtrolCenter… allow the user, instead of save/execute command to show the command to be executed.

like in SQLDeveloper, show SQL.

G

---

<div class="post-metadata">

**Author:** ![rmoff](https://sea1.discourse-cdn.com/flex019/user_avatar/forum.confluent.io/rmoff/32/3_2.png) [@rmoff](https://forum.confluent.io/u/rmoff)\
**Post date:** [14 April 2021 15:46 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/7 "2021-04-14T15:46:31Z")

</div>

Hey george, this is a good idea - you can post it in #tools:graphical-tools 🙂

---

<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:** [14 April 2021 17:17 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/8 "2021-04-14T17:17:25Z")

</div>

I see in the Java code there is a topicExist method, anything similar in Golang, not seeing reference to it.

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:** [21 April 2021 17:17 UTC](https://forum.confluent.io/t/looking-for-example-create-topic/1480/9 "2021-04-21T17:17:31Z")

</div>

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