Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Consumer ¶
type Consumer struct { Logger *zap.SugaredLogger UseOldestOnFail bool // contains filtered or unexported fields }
func NewConsumer ¶
func NewConsumer(lg *zap.SugaredLogger, brokersAddr, topic, clientId string) (*Consumer, error)
func (Consumer) Ack ¶
Ack offsets to be marked as processed on kafka offset-manager. Note: sarama MarkOffset is buffered (default 1s). Upon unclean shutdown we could double process the last 1s messages
func (Consumer) LastOffset ¶
LastOffset returns the last offset of the Client. This uses Kafka's offset manager API. If not found, it returns the oldest-offset for each partition
type HighLevelConsumer ¶
func NewHighLevelConsumer ¶
func NewHighLevelConsumer(ctx context.Context, lg *zap.SugaredLogger, addr string, topic string, app string) *HighLevelConsumer
func (*HighLevelConsumer) StartConsumption ¶
func (con *HighLevelConsumer) StartConsumption(handler func(value []byte) error)
Click to show internal directories.
Click to hide internal directories.