Review comments @Kegsay

This commit is contained in:
Neil Alexander 2020-08-11 12:15:28 +01:00
parent 87f5e5cea3
commit c2c0db3f37
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
2 changed files with 8 additions and 2 deletions

View file

@ -17,6 +17,9 @@
# SQLite is embedded into Dendrite and therefore no further prerequisites are # SQLite is embedded into Dendrite and therefore no further prerequisites are
# needed for the database when using SQLite mode. However, performance with # needed for the database when using SQLite mode. However, performance with
# PostgreSQL is significantly better and recommended for multi-user deployments. # PostgreSQL is significantly better and recommended for multi-user deployments.
# SQLite is typically around 20-30% slower than PostgreSQL when tested with a
# small number of users and likely will perform worse still with a higher volume
# of users.
# #
# The "max_open_conns" and "max_idle_conns" settings configure the maximum # The "max_open_conns" and "max_idle_conns" settings configure the maximum
# number of open/idle database connections. The value 0 will use the database # number of open/idle database connections. The value 0 will use the database
@ -52,8 +55,10 @@ global:
# Configuration for Kafka/Naffka. # Configuration for Kafka/Naffka.
kafka: kafka:
# List of Kafka addresses to connect to. This is not needed if using Naffka. # List of Kafka broker addresses to connect to. This is not needed if using
addresses: [] # Naffka in monolith mode.
addresses:
- localhost:2181
# The prefix to use for Kafka topic names for this homeserver. Change this only if # The prefix to use for Kafka topic names for this homeserver. Change this only if
# you are running more than one Dendrite homeserver on the same Kafka deployment. # you are running more than one Dendrite homeserver on the same Kafka deployment.

View file

@ -33,6 +33,7 @@ func (k *Kafka) TopicFor(name string) string {
func (c *Kafka) Defaults() { func (c *Kafka) Defaults() {
c.UseNaffka = true c.UseNaffka = true
c.Database.Defaults() c.Database.Defaults()
c.Addresses = []string{"localhost:2181"}
c.Database.ConnectionString = DataSource("file:naffka.db") c.Database.ConnectionString = DataSource("file:naffka.db")
c.TopicPrefix = "Dendrite" c.TopicPrefix = "Dendrite"
} }