iris/_examples/kafka-api
Gerasimos (Makis) Maropoulos 6e82b40c2e
_examples: minor
2022-07-21 13:40:20 +03:00
..
1_create_topic.png reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
2_list_topics.png reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
3_store_to_topic.png reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
4_retrieve_from_topic_real_time.png reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
0_docs.png reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
docker-compose.yml minor improvements to the kafka-api example 2020-09-18 13:58:31 +03:00
Dockerfile reorganization of _examples and add some new examples such as iris+groupcache+mysql+docker 2020-06-07 15:26:06 +03:00
go.mod _examples: minor 2022-07-21 13:40:20 +03:00
go.sum _examples: minor 2022-07-21 13:40:20 +03:00
main.go minor improvements to the kafka-api example 2020-09-18 13:58:31 +03:00
postman_collection.json minor improvements to the kafka-api example 2020-09-18 13:58:31 +03:00
README.md minor improvements to the kafka-api example 2020-09-18 13:58:31 +03:00

Writing an API for Apache Kafka with Iris

Read the code.

Docker

  1. Open docker-compose.yml and replace KAFKA_ADVERTISED_HOST_NAME with your own local address
  2. Install Docker
  3. Execute the command below to start kafka stack and the go application:
$ docker-compose up

Troubleshooting

On windows, if you get an error of An attempt was made to access a socket in a way forbidden by its access permissions

Solution:

  1. Stop Docker
  2. Open CMD with Administrator privileges and execute the following commands:
$ dism.exe /Online /Disable-Feature:Microsoft-Hyper-V
$ netsh int ipv4 add excludedportrange protocol=tcp startport=2181 numberofports=1
$ dism.exe /Online /Enable-Feature:Microsoft-Hyper-V /All
$ docker-compose up --build

Manually

Install & run Kafka and Zookeper locally and then:

go run main.go

Screens