aboutsummaryrefslogtreecommitdiff
path: root/eduserver
diff options
context:
space:
mode:
authorNeil Alexander <neilalexander@users.noreply.github.com>2020-10-15 13:27:13 +0100
committerGitHub <noreply@github.com>2020-10-15 13:27:13 +0100
commit49abe359e6a2b0c3f214190b73404c5cf9a0e051 (patch)
treeade4613526d0f6a306cd7117c8f77ab30b151ea0 /eduserver
parent10f1beb0de7a52ccdd122b05b4adffdbdab4ea2e (diff)
Start Kafka connections for each component that needs them (#1527)
* Start Kafka connection for each component that needs one * Fix roomserver unit tests * Rename to naffkaInstance (@Kegsay review comment) * Fix import cycle
Diffstat (limited to 'eduserver')
-rw-r--r--eduserver/eduserver.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/eduserver/eduserver.go b/eduserver/eduserver.go
index b6196c26..098ac024 100644
--- a/eduserver/eduserver.go
+++ b/eduserver/eduserver.go
@@ -24,6 +24,7 @@ import (
"github.com/matrix-org/dendrite/eduserver/inthttp"
"github.com/matrix-org/dendrite/internal/config"
"github.com/matrix-org/dendrite/internal/setup"
+ "github.com/matrix-org/dendrite/internal/setup/kafka"
userapi "github.com/matrix-org/dendrite/userapi/api"
)
@@ -41,10 +42,13 @@ func NewInternalAPI(
userAPI userapi.UserInternalAPI,
) api.EDUServerInputAPI {
cfg := &base.Cfg.EDUServer
+
+ _, producer := kafka.SetupConsumerProducer(&cfg.Matrix.Kafka)
+
return &input.EDUServerInputAPI{
Cache: eduCache,
UserAPI: userAPI,
- Producer: base.KafkaProducer,
+ Producer: producer,
OutputTypingEventTopic: string(cfg.Matrix.Kafka.TopicFor(config.TopicOutputTypingEvent)),
OutputSendToDeviceEventTopic: string(cfg.Matrix.Kafka.TopicFor(config.TopicOutputSendToDeviceEvent)),
ServerName: cfg.Matrix.ServerName,