Configuration
Learn how to configure RouteMQ for your specific needs.
Configuration Overview
RouteMQ uses environment variables for configuration, typically stored in a .env file in your project root.
Quick Configuration
Basic MQTT Setup
MQTT_BROKER=localhost
MQTT_PORT=1883
MQTT_USERNAME=your_username
MQTT_PASSWORD=your_passwordWith Redis (Recommended)
MQTT_BROKER=localhost
MQTT_PORT=1883
ENABLE_REDIS=true
REDIS_HOST=localhost
REDIS_PORT=6379With Database
MQTT_BROKER=localhost
MQTT_PORT=1883
ENABLE_MYSQL=true
DB_HOST=localhost
DB_NAME=routemq
DB_USER=root
DB_PASS=passwordWith Custom Timezone
MQTT_BROKER=localhost
MQTT_PORT=1883
TIMEZONE=Asia/JakartaConfiguration Files
RouteMQ looks for configuration in this order:
Environment variables
.envfile in project rootDefault values
Configuration Topics
Environment Variables - Complete reference of all configuration options
Logging Configuration - Configure logging levels, formats, and file rotation
Timezone Configuration - Set up timezone for logs and application operations
Next Steps
After configuring your environment:
Getting Started Guide - Set up your first RouteMQ application
Routing - Configure MQTT topic routing
Controllers - Create message handlers
Middleware - Add middleware for cross-cutting concerns
Last updated