Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct {
// contains filtered or unexported fields
}
func NewConsumer ¶
func (Consumer) CloseConnection ¶
func (c Consumer) CloseConnection()
type ConsumerGroupHandler ¶
type ConsumerGroupHandler struct{}
ConsumerGroupHandler represents the sarama consumer group
func (ConsumerGroupHandler) Cleanup ¶
func (ConsumerGroupHandler) Cleanup(_ sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited
func (ConsumerGroupHandler) ConsumeClaim ¶
func (h ConsumerGroupHandler) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages(), here is supposed to be what you want to do with the message. In this example the message will be logged with the topic name, partition and message value.
func (ConsumerGroupHandler) Setup ¶
func (ConsumerGroupHandler) Setup(_ sarama.ConsumerGroupSession) error
Setup is run before consumer start consuming, is normally used to setup things such as database connections
Click to show internal directories.
Click to hide internal directories.