mirror of
https://github.com/cgrates/cgrates.git
synced 2026-02-20 06:38:45 +05:00
Moved Kafka constants in utils
This commit is contained in:
committed by
Dan Christian Bogos
parent
d686d3b40a
commit
ca6f3b3319
@@ -34,14 +34,10 @@ const (
|
||||
defaultQueueID = "cgrates_cdrs"
|
||||
defaultExchangeType = "direct"
|
||||
queueID = "queue_id"
|
||||
topic = "topic"
|
||||
exchange = "exchange"
|
||||
exchangeType = "exchange_type"
|
||||
routingKey = "routing_key"
|
||||
|
||||
//awsRegion = "aws_region"
|
||||
//awsID = "aws_key"
|
||||
//awsSecret = "aws_secret"
|
||||
awsToken = "aws_token"
|
||||
folderPath = "folder_path"
|
||||
)
|
||||
|
||||
@@ -57,7 +57,7 @@ func (pstr *KafkaPoster) parseURL(dialURL string) error {
|
||||
|
||||
pstr.dialURL = strings.Split(dialURL, "?")[0]
|
||||
pstr.topic = defaultQueueID
|
||||
if vals, has := qry[topic]; has && len(vals) != 0 {
|
||||
if vals, has := qry[utils.KafkaTopic]; has && len(vals) != 0 {
|
||||
pstr.topic = vals[0]
|
||||
}
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user