.
This commit is contained in:
parent
910d146441
commit
eda764b192
@ -61,6 +61,7 @@ func startProcessingObsMessages(host, username, password string) {
|
||||
if len(username) > 0 && len(password) > 0 {
|
||||
auth = username + ":" + password + "@"
|
||||
}
|
||||
|
||||
connection, err := rabbitmq.DialTLS("amqps://"+auth+host, &tls.Config{
|
||||
ServerName: host,
|
||||
})
|
||||
@ -74,7 +75,12 @@ func startProcessingObsMessages(host, username, password string) {
|
||||
err = ch.ExchangeDeclarePassive("pubsub", "topic", true, false, false, false, nil)
|
||||
failOnError(err, "Cannot find pubsub exchange")
|
||||
|
||||
q, err := ch.QueueDeclare("", false, true, false, false, nil)
|
||||
q, err := ch.QueueDeclarePassive("obs-staging-bot", true, false, true, false, nil)
|
||||
if err != nil {
|
||||
log.Printf("queue not found .. trying to create it\n")
|
||||
q, err = ch.QueueDeclare("obs-staging-bot", true, false, true, false, nil)
|
||||
}
|
||||
//q, err := ch.QueueDeclare("obs-staging-bot", false, true, false, false, nil)
|
||||
failOnError(err, "Cannot declare queue")
|
||||
log.Printf("queue: %s:%d", q.Name, q.Consumers)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user