Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

rabbitmq: Add a RABBITMQ_PORT setting.

Alex Vandiverd3403dde863d
diff --git a/zerver/lib/queue.py b/zerver/lib/queue.py
index 44975fad1ba..b7b469b4fff 100644
--- a/zerver/lib/queue.py
+++ b/zerver/lib/queue.py
@@ -79,6 +79,7 @@ class QueueClient(Generic[ChannelT], metaclass=ABCMeta):
return pika.ConnectionParameters(
settings.RABBITMQ_HOST,
+ port=settings.RABBITMQ_PORT,
heartbeat=self.rabbitmq_heartbeat,
tcp_options=tcp_options,
credentials=credentials,
diff --git a/zproject/default_settings.py b/zproject/default_settings.py
index 9d5f9fb2c2f..1e2c7a3f5df 100644
--- a/zproject/default_settings.py
+++ b/zproject/default_settings.py
@@ -168,6 +168,7 @@ CAMO_URI = ""
MEMCACHED_LOCATION = "127.0.0.1:11211"
MEMCACHED_USERNAME = None if get_secret("memcached_password") is None else "zulip@localhost"
RABBITMQ_HOST = "127.0.0.1"
+RABBITMQ_PORT = 5672
RABBITMQ_USERNAME = "zulip"
REDIS_HOST = "127.0.0.1"
REDIS_PORT = 6379
diff --git a/zproject/prod_settings_template.py b/zproject/prod_settings_template.py
index d32c4cc2657..157cf8e2878 100644
--- a/zproject/prod_settings_template.py
+++ b/zproject/prod_settings_template.py
@@ -574,10 +574,12 @@ SOCIAL_AUTH_SAML_SUPPORT_CONTACT = {
########
## RabbitMQ configuration.
##
-## By default, Zulip connects to RabbitMQ running locally on the machine,
-## but Zulip also supports connecting to RabbitMQ over the network;
-## to use a remote RabbitMQ instance, set RABBITMQ_HOST to the hostname here.
+## By default, Zulip connects to RabbitMQ running locally on the
+## machine, but Zulip also supports connecting to RabbitMQ over the
+## network; to use a remote RabbitMQ instance, set RABBITMQ_HOST, and
+## optionally RABBITMQ_PORT, to the hostname and port here.
# RABBITMQ_HOST = "127.0.0.1"
+# RABBITMQ_PORT = 5672
## To use another RabbitMQ user than the default "zulip", set RABBITMQ_USERNAME here.
# RABBITMQ_USERNAME = "zulip"