Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HandleMessage ¶
HandleMessage is the user-provided function called for each consumed message. It receives the raw *kafka.Message so the caller has access to key, headers, and partition/offset metadata.
type PartitionConsumer ¶
PartitionConsumer subscribes to a topic and runs a dedicated goroutine per assigned partition. Offset storage is explicit: only messages that were successfully handled are stored for auto-commit.
If you return an error from your handler, you get two retries before the consumer will quit and shutdown with an error.
func (*PartitionConsumer) Consume ¶
func (c *PartitionConsumer) Consume(ctx context.Context, handle HandleMessage) error
Click to show internal directories.
Click to hide internal directories.