Documentation ¶
Index ¶
- type Config
- type Consumer
- type Kafka
- func (mq *Kafka) Init(ctx context.Context, log logger.Logger) error
- func (mq *Kafka) Publish(_ context.Context, target string, routingKey []byte, payload []byte) error
- func (mq *Kafka) Subscribe(ctx context.Context, target string, message query.Response) error
- func (mq *Kafka) UnSubscribe(target string) error
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 Sarama consumer group consumer
func (*Consumer) Cleanup ¶
func (consumer *Consumer) Cleanup(sarama.ConsumerGroupSession) error
Cleanup is run at the end of a session, once all ConsumeClaim goroutines have exited
func (*Consumer) ConsumeClaim ¶
func (consumer *Consumer) ConsumeClaim(session sarama.ConsumerGroupSession, claim sarama.ConsumerGroupClaim) error
ConsumeClaim must start a consumer loop of ConsumerGroupClaim's Messages(). Once the Messages() channel is closed, the Handler must finish its processing loop and exit.
Click to show internal directories.
Click to hide internal directories.