123456789101112131415161718192021222324 |
- package service
- import (
- "github.com/confluentinc/confluent-kafka-go/v2/kafka"
- )
- type ConsumerHandler func(*kafka.Message) error
- type Consumer interface {
- Service
- SetPause(bool) error
- Paused() bool
- Subscribe([]string, chan *kafka.Message) error
- Subscribed() bool
- RegisterHandlers(...ConsumerHandler)
- }
- type Producer interface {
- Service
- Produce(*kafka.Message) error
- }
|