Moved Kafka constants in utils

This commit is contained in:
Trial97
2019-09-09 10:42:36 +03:00
committed by Dan Christian Bogos
parent d686d3b40a
commit ca6f3b3319
4 changed files with 13 additions and 18 deletions

View File

@@ -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"
)

View File

@@ -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