Skip to content

kata-ai/messagebus-golang-kafka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Kafka Message Bus

How to Use

Use at Other Projects

Since this library does not reside in a Go Proxy repository, you need to use it with Go module's replace directive. You need to set your go.mod file as following:

require (
    ...
    github.com/kata-ai/messagebus-golang-kafka v1.1.0
)

replace github.com/kata-ai/messagebus-golang-kafka => ../shared-libs/golang/messagebus-kafka/1.1.0

The replace directive is filled with this library's module name and its relative path to your project.

Use Avro Schema

This library only accept Gogen-avro schema. If you have an Avro schema in a avsc file, you need to convert it to Gogen-avro schema with these steps:

  1. Install Gogen-avro with its installation guide

  2. Convert your avsc file to Go file with Gogen-avro command:

    gogen-avro --package=<generated-file-package-name> schemas <schema-directory>

    For example, if you have an Avro schema in schemas/prediction_log.avsc, you have to execute this command:

    gogen-avro --package=schemas schemas schemas/prediction_log.avsc

    It will create a Go file in schemas directory and you can use it with this library.

Examples

About

Message Bus for Golang Kafka

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages