RabbitMQ Connection Guide
Service Management
After creating the service, you will be redirected to the App Management page.
On this page, you can:
- Activate or deactivate your service
- View how to connect to the service
- Customize the service configuration
Connection Information
Click on the Connection Method option in the Basic Settings tab.
On this page, you will find the following information:
- Internal Endpoint: The internal address of the service
- External Endpoint: The external address of the service for connections from outside Kobar
- Port: The connection port of the service, which is by default
5672
- User: The username of the service, which is automatically assigned
- Password: The password of the service, which can be set automatically or manually
Connection
To connect to RabbitMQ, you can use one of the following methods:
Through the Dashboard
To connect to the RabbitMQ dashboard, click on the Domain and enter the provided username and password in the opened page.
Through the API
Before connecting via API, click on the Create External Port option on the Connection Method page. From there, you can use the External Endpoint and the external Port instead of 5672
.
To connect to RabbitMQ, you can use the pika
library in Python.
import pika
connection = pika.BlockingConnection(
pika.ConnectionParameters(host='External Endpoint', port=Port, credentials=pika.PlainCredentials('User', 'Password')))
channel = connection.channel()
RabbitMQ uses two ports for connection:
- Port
5672
for AMQP connections - Port
15672
for RabbitMQ management connections
To view the domain connected to these ports, you can refer to the Ports and Domains tab.