Skip to content

Commit

Permalink
chore: small patch to fix consumer_group check
Browse files Browse the repository at this point in the history
  • Loading branch information
shivanshuraj1333 committed Aug 26, 2024
1 parent 7416245 commit 3b94dab
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,14 @@ func buildClickHouseQuery(messagingQueue *MessagingQueue, queueType string, quer
return nil, fmt.Errorf("invalid type for Partition")
}

consumerGroup, ok := messagingQueue.Variables["consumer_group"]
if !ok {
return nil, fmt.Errorf("invalid type for consumer group")
}

var query string
if queryContext == "producer" {
query = generateProducerSQL(start, end, topic, partition, queueType)
} else if queryContext == "consumer" {
consumerGroup, ok := messagingQueue.Variables["consumer_group"]
if !ok {
return nil, fmt.Errorf("invalid type for consumer group")
}
query = generateConsumerSQL(start, end, topic, partition, consumerGroup, queueType)
}

Expand Down

0 comments on commit 3b94dab

Please sign in to comment.