Skip to content

A Go library that provides core Kafka messaging and stream processing.

License

Notifications You must be signed in to change notification settings

udayangaac/keystone

Repository files navigation

keystone

Godoc Releases codecov Go Report Card

A core Kafka library for Go, providing reliable messaging primitives and stream-processing foundations.

Example

  • Consumer Group
// Avro schema registry configurations.
// Need to register new schemas here.
sr := avro.NewCachedSchemaRegistry([]string{"foobar"}, 1)

// Kafka configurations
cfg := keystone.Config{
	Brokers:          []string{"localhost:9092"},
	Group:            "sampleConsumer",
	Version:          keystone.Version_2_1_1,
	Topics:           []string{"foobar"},
	BalanceStrategy:  keystone.RoundRobin,
	Offset:           keystone.Oldest,
	ConsumerCallback: Callback,
	Decoder:          keystone.GetDefaultDecoder(),
	EncoderBuilder:   keystone.DefaultEncoderBuilder(),
}

cg := keystone.NewConsumerGroup(cfg)
// Function is called when message recieved.
func Callback(key interface{}, value interface{}) (err error) {
	return nil
}

About

A Go library that provides core Kafka messaging and stream processing.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages