Skip to content

Commit

Permalink
Describe MSK cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
atanasdinov committed Feb 2, 2023
1 parent 8168cda commit 4a29fc2
Show file tree
Hide file tree
Showing 5 changed files with 104 additions and 72 deletions.
8 changes: 5 additions & 3 deletions cmd/content-rw-elasticsearch/main.go
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/Financial-Times/content-rw-elasticsearch/v4/pkg/mapper"
"github.com/Financial-Times/content-rw-elasticsearch/v4/pkg/message"
"github.com/Financial-Times/go-logger/v2"
"github.com/Financial-Times/kafka-client-go/v3"
"github.com/Financial-Times/kafka-client-go/v4"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
cli "github.com/jawher/mow.cli"
Expand Down Expand Up @@ -151,14 +151,16 @@ func main() {
consumerConfig := kafka.ConsumerConfig{
BrokersConnectionString: *kafkaAddress,
ConsumerGroup: *kafkaConsumerGroup,
ConnectionRetryInterval: time.Minute,
OffsetFetchInterval: time.Duration(*kafkaTopicOffsetFetchInterval) * time.Minute,
Options: kafka.DefaultConsumerOptions(),
}
topics := []*kafka.Topic{
kafka.NewTopic(*kafkaTopic, kafka.WithLagTolerance(int64(*kafkaLagTolerance))),
}
messageConsumer := kafka.NewConsumer(consumerConfig, topics, log)
messageConsumer, err := kafka.NewConsumer(consumerConfig, topics, log)
if err != nil {
log.WithError(err).Fatal("Failed to initialize Kafka consumer")
}

handler := message.NewMessageHandler(
esService,
Expand Down
45 changes: 29 additions & 16 deletions go.mod
Expand Up @@ -5,7 +5,7 @@ go 1.19
require (
github.com/Financial-Times/go-fthealth v0.0.0-20180807113633-3d8eb430d5b5
github.com/Financial-Times/go-logger/v2 v2.0.1
github.com/Financial-Times/kafka-client-go/v3 v3.0.5
github.com/Financial-Times/kafka-client-go/v4 v4.1.1
github.com/Financial-Times/service-status-go v0.0.0-20160323111542-3f5199736a3d
github.com/Financial-Times/transactionid-utils-go v0.2.0
github.com/aws/aws-sdk-go v1.44.83
Expand All @@ -14,35 +14,48 @@ require (
github.com/olivere/elastic/v7 v7.0.29
github.com/pborman/uuid v0.0.0-20170612153648-e790cca94e6c
github.com/spf13/viper v1.9.0
github.com/stretchr/testify v1.7.0
github.com/stretchr/testify v1.8.1
)

require (
github.com/Shopify/sarama v1.33.0 // indirect
github.com/Shopify/sarama v1.38.1 // indirect
github.com/aws/aws-sdk-go-v2 v1.17.3 // indirect
github.com/aws/aws-sdk-go-v2/config v1.18.11 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.13.11 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.12.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.1.27 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.4.21 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.3.28 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.9.21 // indirect
github.com/aws/aws-sdk-go-v2/service/kafka v1.19.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.12.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.14.0 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.18.2 // indirect
github.com/aws/smithy-go v1.13.5 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/eapache/go-resiliency v1.2.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20180814174437-776d5712da21 // indirect
github.com/eapache/go-resiliency v1.3.0 // indirect
github.com/eapache/go-xerial-snappy v0.0.0-20230111030713-bf00bc1b83b6 // indirect
github.com/eapache/queue v1.1.0 // indirect
github.com/fsnotify/fsnotify v1.5.1 // indirect
github.com/golang/snappy v0.0.4 // indirect
github.com/hashicorp/errwrap v1.0.0 // indirect
github.com/hashicorp/go-multierror v1.1.1 // indirect
github.com/hashicorp/go-uuid v1.0.2 // indirect
github.com/hashicorp/go-uuid v1.0.3 // indirect
github.com/hashicorp/go-version v1.0.0 // indirect
github.com/hashicorp/hcl v1.0.0 // indirect
github.com/jcmturner/aescts/v2 v2.0.0 // indirect
github.com/jcmturner/dnsutils/v2 v2.0.0 // indirect
github.com/jcmturner/gofork v1.0.0 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.2 // indirect
github.com/jcmturner/gofork v1.7.6 // indirect
github.com/jcmturner/gokrb5/v8 v8.4.3 // indirect
github.com/jcmturner/rpc/v2 v2.0.3 // indirect
github.com/jmespath/go-jmespath v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/klauspost/compress v1.15.0 // indirect
github.com/klauspost/compress v1.15.14 // indirect
github.com/magiconair/properties v1.8.5 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mitchellh/mapstructure v1.4.2 // indirect
github.com/pelletier/go-toml v1.9.4 // indirect
github.com/pierrec/lz4 v2.6.1+incompatible // indirect
github.com/pierrec/lz4/v4 v4.1.17 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rcrowley/go-metrics v0.0.0-20201227073835-cf1acfcdf475 // indirect
Expand All @@ -51,13 +64,13 @@ require (
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
github.com/stretchr/objx v0.1.1 // indirect
github.com/stretchr/objx v0.5.0 // indirect
github.com/subosito/gotenv v1.2.0 // indirect
golang.org/x/crypto v0.0.0-20220214200702-86341886e292 // indirect
golang.org/x/net v0.0.0-20220225172249-27dd8689420f // indirect
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
golang.org/x/text v0.3.7 // indirect
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
golang.org/x/net v0.5.0 // indirect
golang.org/x/sys v0.4.0 // indirect
golang.org/x/text v0.6.0 // indirect
gopkg.in/ini.v1 v1.63.2 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
)

0 comments on commit 4a29fc2

Please sign in to comment.