Skip to content

robowealth-mutual-fund/blueprint-emitter-service

Repository files navigation

Blueprint ROA Golang gRPC Gateway With Emitter Kafka Streams

Description

Blueprint Emitter Service

Documentation

Emitter is one of the 3 parts of Goka's Kafka streams that produce a message to specified stream topic with given configurations. When Emitter producing a message, there may be a Processor waiting to process the message from stream topic such as counter, filter or lookup etc.

Features

  • Producer Message
  • Support gRPC and RESTful

Dependencies

  • Goka
  • Protoc gen gRPC gateway
  • Protoc gen OpenAPI V2

Prerequisites

  • Docker
  • Kafka
  • Zookeeper
  • Postgres
  • Protoc

Run locally

  1. Install protoc gen gRPC gateway
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-grpc-gateway@latest
  1. Install protoc gen OpenAPI (Swagger)
go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest
  1. Compile .proto file
make pbgen
  1. Start server
make start

Recommendation

Before push, should run linter always for code quality

  1. Install linter (golangci-lint)
go install github.com/golangci/golangci-lint/cmd/golangci-lint@latest
  1. Run linter
golangci-lint run

Connections

  • GRPC: localhost:3000
  • HTTP: localhost:3001
  • Swagger: localhost:3001/swagger-ui

Resources

Happy Coding...

Releases

No releases published

Packages

No packages published