Skip to content

Commit

Permalink
The consumer interface is changed to a minimum subset
Browse files Browse the repository at this point in the history
Signed-off-by: axfor <aixiaoxiang2009@hotmail.com>
  • Loading branch information
axfor committed Mar 22, 2023
1 parent f8863b5 commit e74b66b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/kafka/consumer/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
package consumer

import (
"context"
"fmt"

"github.com/Shopify/sarama"
Expand All @@ -25,7 +26,9 @@ import (

// Consumer is an interface to features of Sarama that are necessary for the consumer
type Consumer interface {
sarama.ConsumerGroup
Consume(ctx context.Context, topics []string, handler sarama.ConsumerGroupHandler) error
Errors() <-chan error
Close() error
}

// Builder builds a new kafka consumer
Expand Down

0 comments on commit e74b66b

Please sign in to comment.