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
}
Consumer represents a buffered Kafka consumer.
func New ¶
func New(ctx context.Context, opts ...ConsumerFunc) (*Consumer, error)
New creates a new Consumer instance.
func (*Consumer) GetNextBatch ¶ added in v1.0.0
GetNextBatch gets the next count messages from the queue.
type ConsumerFunc ¶
type ConsumerFunc func(*Consumer)
ConsumerFunc represents a function that configures the Consumer.
func WithBrokers ¶
func WithBrokers(brokers []string) ConsumerFunc
WithBrokers sets the brokers on the Consumer.
func WithBufferSize ¶
func WithBufferSize(size int) ConsumerFunc
WithBufferSize sets the buffer size on the Consumer.
func WithGroupID ¶
func WithGroupID(groupID string) ConsumerFunc
WithGroupID sets the group id on the Consumer.
func WithTopics ¶
func WithTopics(topics []string) ConsumerFunc
WithTopics sets the topics on the Consumer.
Click to show internal directories.
Click to hide internal directories.