Skip to content

Commit

Permalink
[MINOR]: Update asyncapi Kafka consumer to use bootstrap server url (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
cryoshida authored Oct 25, 2024
1 parent 3c70fb9 commit 69941b8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions internal/asyncapi/account_details.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ type accountDetails struct {
clusterCreds *config.APIKeyPair
consumer *ckgo.Consumer
kafkaUrl string
kafkaBootstrapUrl string
schemaRegistryUrl string
srClient *schemaregistry.Client
subjects []string
Expand Down
4 changes: 3 additions & 1 deletion internal/asyncapi/command_export.go
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ func (c *command) getAccountDetails(cmd *cobra.Command, flags *flags) (*accountD

// Create Consumer
if flags.consumeExamples {
details.consumer, err = createConsumer(details.kafkaUrl, details.clusterCreds, flags.group)
details.consumer, err = createConsumer(details.kafkaBootstrapUrl, details.clusterCreds, flags.group)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -440,7 +440,9 @@ func (c *command) getClusterDetails(details *accountDetails, flags *flags) error
details.kafkaClusterId = cluster.ID
details.schemaRegistryClusterId = clusters[0].GetId()
details.clusterCreds = clusterCreds
// kafkaUrl is used in exported file, while kafkaBootstrapUrl is used to create Kafka consumer
details.kafkaUrl = kafkaREST.CloudClient.GetUrl()
details.kafkaBootstrapUrl = cluster.Bootstrap
details.schemaRegistryUrl = clusters[0].Spec.GetHttpEndpoint()
details.topics = topics.Data

Expand Down

0 comments on commit 69941b8

Please sign in to comment.