Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Consume ¶
func Consume(topic string, consumerGroup string, handler HandlerFunc)
Adds a handler to consume messages on the kafka topic.
Types ¶
type Config ¶
type Config struct { KafkaBroker string Logger *zap.SugaredLogger Retries int }
Configuration for running the app. Retries : number of times to retry handling a message consumed on topic before being dumped Logger: instance to be used by Vodfka KafkaBroker: kafka broker host and port ex: "localhost:9092"
type Context ¶
type Context interface {
BindJSON(interface{}) error
}
Consumer handler Context allows to retrieve information about the incoming messsages
type HandlerFunc ¶
Contains the business logic that will handle messages received by the topic consumer
Click to show internal directories.
Click to hide internal directories.