{"id":28378605,"url":"https://github.com/andiveloper/eventor","last_synced_at":"2026-07-10T16:31:27.045Z","repository":{"id":219678289,"uuid":"488594512","full_name":"andiveloper/eventor","owner":"andiveloper","description":"Learning Golang - eventor is an ultra lightweight proxy which turns your synchronous REST API into an asynchronous, event-driven microservice.","archived":false,"fork":false,"pushed_at":"2022-05-17T18:00:47.000Z","size":64,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-09T23:34:00.072Z","etag":null,"topics":["event-driven","golang","kafka","microservice","proxy","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andiveloper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-05-04T13:13:37.000Z","updated_at":"2022-11-03T08:01:04.000Z","dependencies_parsed_at":null,"dependency_job_id":"a479e7a4-6fe2-4f51-96b9-a32900e2fbad","html_url":"https://github.com/andiveloper/eventor","commit_stats":null,"previous_names":["andiveloper/eventor","akoeninger89/eventor"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andiveloper/eventor","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andiveloper%2Feventor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andiveloper%2Feventor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andiveloper%2Feventor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andiveloper%2Feventor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andiveloper","download_url":"https://codeload.github.com/andiveloper/eventor/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andiveloper%2Feventor/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35337280,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-10T02:00:06.465Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["event-driven","golang","kafka","microservice","proxy","rest-api"],"created_at":"2025-05-30T02:06:53.573Z","updated_at":"2026-07-10T16:31:27.040Z","avatar_url":"https://github.com/andiveloper.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# eventor\n\n`eventor` is an ultra lightweight proxy which turns your synchronous REST API into an asynchronous, event-driven\nmicroservice. It does that by consuming an event from a Kafka topic, sending the event to your REST API endpoint and\npublishing the response onto another Kafka topic.\n\nIn the cloud-native Kubernetes world a common use case could be to add `eventor` as a sidecar container to your existing pod.\nThat way your so far synchronous RESTful service is immediately opened up for an event-driven architecture without any code changes.\n\n![eventor](eventor.png?raw=true \"eventor\")\n\n## Sample config:\n\n```yaml\n- name: MY_FIRST_TOPIC-to-MY_RESPONSE_TOPIC\n  logLevel: 0 # 0 = DEBUG, 1 = INFO, 2 = WARN, 3 = ERROR\n  eventListener:\n    type: kafka\n    topic: MY_FIRST_TOPIC # the topic from which events are consumed\n    consumerConfig:\n      bootstrap.servers: localhost, 127.0.0.1\n      group.id: myVeryFirstGroup\n      auto.offset.reset: earliest\n      enable.auto.commit: false # auto commit should be disabled since the listener commits messages only if everything was fine\n  eventHandler:\n    type: http\n    method: POST # the http method that is used for the request\n    url: http://localhost:8080/payload # the URL to which the event is sent\n    headers:\n      Content-Type: application/text # defaults to application/text\n      Authorization: Basic ...\n  eventResultProcessor:\n    type: kafka\n    topic: MY_RESPONSE_TOPIC # the topic to which the response body received from the eventHandler is sent to\n    when:\n      - onSuccess # can be 'onSuccess' which means the response is published if HTTP statusCode \u003c 400, or 'onError' for HTTP statusCode \u003e= 400\n    producerConfig:\n      bootstrap.servers: localhost\n      acks: all\n```\n\nThis config starts an event listener which consumes events from a Kafka topic called `MY_FIRST_TOPIC`. The consumed\nevent payload is then send to `http://localhost:8080/payload` for processing.\n\nIf the returned HTTP status code is \u003c400 (because `when` is set to `onSuccess`) the response body is sent to\nanother Kafka topic called `MY_RESPONSE_TOPIC`.\n\nOnly if the call to the http endpoint AND sending the event to 'MY_RESPONSE_TOPIC' was successful the message is\ncommitted.\n\n## Additional librdkafka setup to build/test/run on MacOS/arm64\n\n```bash\nbrew install openssl\nbrew install librdkafka\nbrew install pkg-config\nexport PKG_CONFIG_PATH=\"/opt/homebrew/opt/openssl@3/lib/pkgconfig\"\ngo build -tags dynamic -o eventor cmd/main.go\n```\n\n## Sample usage\n\n```bash\n# Start a single node Kafka cluster\ndocker-compose -f ./kafka/docker-compose.yaml up -d\n\n# Open a new terminal and start an interactive console producer which can send events to \"MY_FIRST_TOPIC\":\ndocker exec -it kafka_kafka_1 /bin/sh -c \"kafka-console-producer.sh --bootstrap-server localhost:9092 --topic MY_FIRST_TOPIC\"\n\n# Open a new terminal and start an interactive console consumer which reads events from the topic \"MY_RESPONSE_TOPIC\"\ndocker exec -it kafka_kafka_1 /bin/sh -c \"kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic MY_RESPONSE_TOPIC\"\n\n# Open a new terminal and start the sample HTTP server which will print the received headers and body and send the body as-is back to the client\ngo run tools/http_server.go\n\n# Open a new terminal and  start the eventor service with the sample config:\n# 'eventor' will read any message from 'MY_FIRST_TOPIC', send the message to the local HTTP server, and publish the response to 'MY_RESPONSE_TOPIC'\n# Note: '-tags dynamic' must be used on Mac/arm64 so that the correct librdkafka is used\ngo run -tags dynamic cmd/main.go -f sample_config.yaml\n```\n\nWhen all services are up and running you can now continue and send your first event:\n\n```bash\n# Sent an event using the interactive console producer by typing 'Hello World' and hitting enter:\n$ docker exec -it kafka_kafka_1 /bin/sh -c \"kafka-console-producer.sh --bootstrap-server localhost:9092 --topic MY_FIRST_TOPIC\"\n\u003eHello World!\n\n# The eventor service will show:\n$ go run -tags dynamic cmd/main.go -f sample_config.yaml\n2022/05/16 15:42:12 DEBUG - handling message: MY_FIRST_TOPIC[0]@184\n2022/05/16 15:42:12 DEBUG - calling endpoint: 'POST http://localhost:8080/payload'\n2022/05/16 15:42:12 DEBUG - successfully produced EventHandler result: MY_RESPONSE_TOPIC[0]@97\n2022/05/16 15:42:38 DEBUG - handling message: MY_FIRST_TOPIC[0]@185\n2022/05/16 15:42:38 DEBUG - calling endpoint: 'POST http://localhost:8080/payload'\n2022/05/16 15:42:38 DEBUG - successfully produced EventHandler result: MY_RESPONSE_TOPIC[0]@98\n\n# The sample HTTP server will show:\n$ go run tools/http_server.go\nListening on port 8080...\n---------------------- request ----------------------\nAccept-Encoding: gzip\nUser-Agent: Go-http-client/1.1\nContent-Length: 12\nAuthorization: Basic ...\nContent-Type: application/text\n\nHello World!\n\n\n# The consumer will show:\n$ docker exec -it kafka_kafka_1 /bin/sh -c \"kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic MY_RESPONSE_TOPIC\"\nHello World!\n```\n\n## Future work\n\n- support for custom Kafka event keys (null is used for now, which does not guarantee event ordering when multiple\n  partitions are used)\n- support for proper error handling if the call to the `eventHandler` fails or responds with a none 2xx status code\n- support for additional HTTP authentication schemes like OAuth2.0, ...\n- support for other `eventListener`, `eventHandler` and `eventResultProcessor` types like NATS or RabbitMQ\n\n## Useful commands\n\n```bash\n# build:\ngo build -tags dynamic -o eventor cmd/main.go\n\n# test:\ngo test -tags dynamic ./pkg ./cmd\n\n# run:\ngo run -tags dynamic cmd/main.go\n\n# run sample:\ngo run -tags dynamic cmd/main.go -f sample_config.yaml\n\n# start sample http server:\ngo run tools/http_server.go\n\n# start single node kafka:\ndocker-compose -f ./kafka/docker-compose.yaml up -d\n\n# start consumer:\ndocker exec -it kafka_kafka_1 /bin/sh -c \"kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic MY_RESPONSE_TOPIC\"\n\n# start producer:\ndocker exec -it kafka_kafka_1 /bin/sh -c \"kafka-console-producer.sh --bootstrap-server localhost:9092 --topic MY_FIRST_TOPIC\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandiveloper%2Feventor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandiveloper%2Feventor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandiveloper%2Feventor/lists"}