go-kafka
A small Go and Kafka application, built to learn the moving parts.
- Go
- Kafka
- Docker
- COMMITS
- 10
- FIRST
- Aug 2023
- LAST
- Jul 2025
- ACTIVE MONTHS
- 3
Go Kafka app
This is a simple app built using Golang, Kafka, and PostgreSQL. It exposes several APIs to create and fetch users and products. Utilizes Kafka for retrieval and publishing of data.
Fig: Workflow of the APP
GO RESTful APIs
I built a server using Golang and PostgreSQL. It exposed many API endpoints to create users as well as products. It also exposes a special GET endpoint that can be used to listen to the Kafka Queue

Fig: Directory structure

Fig: API endpoints for the app
Kafka server

Fig: Kafka Server is ran locally on the machine as looks like this
1. Post a product
Create a post request for adding Product to the database

Fig: POST API for the creation of products. This houses a function to publish onto a Kafka queue.
2. Publish to Kafka
The API function calls in itself, a function to publish onto the Kafka queue

Figure: Kafka consumer acknowledges that it can see a value.
![]()
Figure: Logger for successful publishing
3. Consume Kafka
We try to get the data from the Kafka queue, using a function for consumer

Figure: A GET API to call the Kafak consumer, fetch from DB and return value.
4. Return value
We try to get the data from the kafka queue, using a function for consumer

Fig: Finally returns a value.
HEAD · c93e5f83 FOLDERS · 10 FILES
- apiexposed APIs and created kafka funcsAug 2023
- databaseexposed APIs and created kafka funcsAug 2023
- kafkaqueueexposed APIs and created kafka funcsAug 2023
- .gitignoreexposed APIs and created kafka funcsAug 2023
- go.modexposed APIs and created kafka funcsAug 2023
- go.sumexposed APIs and created kafka funcsAug 2023
- main_test.goexposed APIs and created kafka funcsAug 2023
- main.goexposed APIs and created kafka funcsAug 2023
- README.mdUpdate README.mdJul 2025
Showing the top two levels. Files aren't browsable: this is a portfolio, not a mirror.
10 COMMITS · 1 AUTHOR
TUE, JUL 22 20251 COMMIT
- c93e5f8Update README.mdEYJul 2025Jul 2025
TUE, FEB 18 20253 COMMITS
- a16a59cUpdate README.mdEYFeb 2025Feb 2025
- 05881edUpdate README.mdEYFeb 2025Feb 2025
- 25466d1Update README.mdEYFeb 2025Feb 2025
TUE, AUG 1 20236 COMMITS
- 62cc87bUpdate README.mdEYAug 2023Aug 2023
- e51ed43Update README.mdEYAug 2023Aug 2023
- 1260ee3Update README.mdEYAug 2023Aug 2023
- 8d03770README.md initEYAug 2023Aug 2023
- 46a66f5initialized readmeEYAug 2023Aug 2023
- c0bacceexposed APIs and created kafka funcsEYAug 2023Aug 2023
That's every commit.