Skip to content

Commit

Permalink
kafka - disable keeping metadata for all topics
Browse files Browse the repository at this point in the history
Signed-off-by: Fabian Martinez <46371672+famarting@users.noreply.github.com>
  • Loading branch information
famarting committed Nov 23, 2023
1 parent ba5831b commit 06b5f16
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions common/component/kafka/kafka.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ func (k *Kafka) Init(_ context.Context, metadata map[string]string) error {
config := sarama.NewConfig()
config.Version = meta.internalVersion
config.Consumer.Offsets.Initial = k.initialOffset
// configure the client to not keep the metadata for all the topics in the cluster, just the topics used by this client
config.Metadata.Full = false

if meta.ClientID != "" {
config.ClientID = meta.ClientID
Expand Down

0 comments on commit 06b5f16

Please sign in to comment.