mirror of
https://github.com/hoernschen/dendrite.git
synced 2024-12-27 07:28:27 +00:00
Use all configured NATS addresses
This commit is contained in:
parent
c575f5501f
commit
0c88ac6158
1 changed files with 2 additions and 1 deletions
|
@ -1,6 +1,7 @@
|
|||
package kafka
|
||||
|
||||
import (
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
js "github.com/S7evinK/saramajetstream"
|
||||
|
@ -66,7 +67,7 @@ func setupNaffka(cfg *config.Kafka) (sarama.Consumer, sarama.SyncProducer) {
|
|||
|
||||
func setupNATS(cfg *config.Kafka) (sarama.Consumer, sarama.SyncProducer) {
|
||||
logrus.WithField("servers", cfg.Addresses).Debug("connecting to nats")
|
||||
nc, err := nats.Connect(cfg.Addresses[0])
|
||||
nc, err := nats.Connect(strings.Join(cfg.Addresses, ","))
|
||||
if err != nil {
|
||||
logrus.WithError(err).Panic("failed to connect to nats")
|
||||
return nil, nil
|
||||
|
|
Loading…
Reference in a new issue