Documentation ¶
Overview ¶
Package simple provides a simple consumer implementation without consumer groups.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithDurationOffset ¶ added in v0.49.0
func WithDurationOffset(since time.Duration, timeExtractor TimeExtractor) kafka.OptionFunc
WithDurationOffset allows creating a consumer from a given duration. It accepts a function indicating how to extract the time from a Kafka message.
func WithNotificationOnceReachingLatestOffset ¶ added in v0.57.0
func WithNotificationOnceReachingLatestOffset(ch chan<- struct{}) kafka.OptionFunc
WithNotificationOnceReachingLatestOffset closes the input channel once all the partition consumers have reached the latest offset.
func WithTimestampOffset ¶ added in v0.67.0
func WithTimestampOffset(since time.Duration) kafka.OptionFunc
WithTimestampOffset allows creating a consumer from a given duration.
Types ¶
type Factory ¶
type Factory struct {
// contains filtered or unexported fields
}
Factory definition of a consumer factory.
type TimeExtractor ¶ added in v0.49.0
type TimeExtractor func(*sarama.ConsumerMessage) (time.Time, error)
TimeExtractor defines a function extracting a time from a Kafka message.
Click to show internal directories.
Click to hide internal directories.