RabbitMQ Management - Message Broker Administration Interface
Web Interface: Queue Management • Exchange Administration • User Management • Message Monitoring • Connection Tracking • Virtual Host Configuration • Performance Metrics
File: docs/package-management-rabbitmq.md
Purpose: Complete guide to RabbitMQ management UI usage and administration in Urbalurba infrastructure
Target Audience: Message queue administrators, developers working with AMQP, system architects using pub/sub patterns
Last Updated: September 23, 2024
📋 Overview
The RabbitMQ Management Interface provides a comprehensive web-based administration console for the RabbitMQ message broker in the Urbalurba infrastructure. This interface is automatically deployed as part of the RabbitMQ installation and offers complete management capabilities for queues, exchanges, users, and system monitoring.
Key Features:
- Web-Based Interface: Complete RabbitMQ administration via browser
- Automatic Deployment: Management UI included with RabbitMQ installation
- Queue Management: Create, monitor, and manage message queues
- Exchange Administration: Configure routing and message distribution
- User & Permission Management: Control access and virtual host permissions
- Real-Time Monitoring: Live message rates, connection tracking, and performance metrics
- DNS-Based Routing: Accessible via
rabbitmq.localhostwith multi-domain support - Integrated Authentication: Uses RabbitMQ's built-in user system with urbalurba-secrets
🏗️ Architecture
Management UI Components
RabbitMQ Management Stack:
├── RabbitMQ Server (with management plugin enabled)
├── Management UI (embedded web interface on port 15672)
├── Service (ClusterIP exposing AMQP 5672 and Management 15672)
├── IngressRoute (Traefik routing for rabbitmq.localhost)
├── urbalurba-secrets (administrative credentials)
└── Authentication (RabbitMQ built-in user management)
Related Infrastructure Files
RabbitMQ Deployment:
├── provision-host/kubernetes/03-queues/08-setup-rabbitmq.sh # Main deployment
├── manifests/080-rabbitmq-config.yaml # RabbitMQ configuration
├── manifests/081-rabbitmq-ingressroute.yaml # Management UI routing
├── ansible/playbooks/080-setup-rabbitmq.yml # Deployment automation
└── docs/package-queues-rabbitmq.md # RabbitMQ deployment guide
🌐 Access & Authentication
Web Interface Access
# Primary access via DNS routing
http://rabbitmq.localhost
# Port-forward access (alternative)
kubectl port-forward svc/rabbitmq 15672:15672
# Then access: http://localhost:15672
Login Credentials
RabbitMQ management uses credentials configured in urbalurba-secrets based on the secrets-templates:
# Get RabbitMQ credentials from urbalurba-secrets
kubectl get secret urbalurba-secrets -o jsonpath='{.data.RABBITMQ_USERNAME}' | base64 -d
kubectl get secret urbalurba-secrets -o jsonpath='{.data.RABBITMQ_PASSWORD}' | base64 -d
From secrets-templates configuration:
- Username:
rabbitmq-admin - Password: Uses
${DEFAULT_DATABASE_PASSWORD}(your configured default password)
Login Process:
- Navigate to
http://rabbitmq.localhost - Enter username:
rabbitmq-admin - Enter password: (your DEFAULT_DATABASE_PASSWORD value)
- Click "Login" to access the management interface
🛠️ Management Operations
Queue Management
Through RabbitMQ Management UI:
Create Queues
- Navigate to "Queues and Streams" tab
- Click "Add a new queue"
- Configure queue properties:
- Name: Queue identifier
- Durability: Survive broker restarts
- Auto Delete: Delete when unused
- Arguments: Additional queue configuration
- Click "Add queue"
Monitor Queues
- Message Rates: View publish/deliver/acknowledge rates
- Queue Depth: Monitor message backlog
- Consumer Count: Track active consumers
- Queue Details: Memory usage, state, and configuration
Queue Operations
# Queue management through UI:
# - Purge messages: Remove all messages from queue
# - Delete queue: Permanently remove queue
# - Publish message: Send test messages
# - Get messages: Retrieve and inspect messages
Exchange Management
Through RabbitMQ Management UI:
Create Exchanges
- Navigate to "Exchanges" tab
- Click "Add a new exchange"
- Configure exchange properties:
- Name: Exchange identifier
- Type: direct, topic, fanout, headers
- Durability: Persist through restarts
- Auto Delete: Remove when unbounded
- Click "Add exchange"
Binding Management
- Create Bindings: Link exchanges to queues with routing keys
- View Bindings: Monitor routing relationships
- Test Routing: Publish messages to test routing logic
User Management
Through RabbitMQ Management UI:
Create Users
- Navigate to "Admin" → "Users" tab
- Click "Add a user"
- Configure user properties:
- Username: User identifier
- Password: User password
- Tags: Admin, monitoring, policymaker, management
- Click "Add user"
Virtual Host Management
- Navigate to "Admin" → "Virtual Hosts" tab
- Click "Add a new virtual host"
- Set virtual host name and description
- Configure user permissions for virtual host
Permission Management
- Set Permissions: Configure read/write/configure access
- Virtual Host Access: Control user access to virtual hosts
- Policy Management: Set queue and exchange policies
Monitoring & Diagnostics
Overview Dashboard
- Global Statistics: Message rates, queue totals, connection counts
- Node Information: Memory usage, disk space, Erlang version
- Import/Export: Configuration backup and restore
Connection Monitoring
- Navigate to "Connections" tab
- Monitor active connections:
- Client Information: IP addresses, protocols, users
- Channel Count: Active channels per connection
- Data Rates: Bytes in/out per connection
- Connection State: Running, blocking, flow control
Performance Monitoring
# Through Management UI:
# - Message rates: Real-time publish/deliver/acknowledge rates
# - Memory usage: Per-queue and total broker memory
# - Disk usage: Message persistence and logging
# - Network I/O: Connection bandwidth utilization
🔍 Health Checks & Verification
Service Status Verification
# Check RabbitMQ pod status
kubectl get pods -l app.kubernetes.io/name=rabbitmq
# Check RabbitMQ service status
kubectl get svc rabbitmq
# Check management UI routing
kubectl get ingressroute rabbitmq-management
# View RabbitMQ logs
kubectl logs -l app.kubernetes.io/name=rabbitmq
Management UI Testing
# Test HTTP response from within cluster
kubectl run curl-test --image=curlimages/curl --rm -it --restart=Never -- \
curl -s -w "HTTP_CODE:%{http_code}" http://rabbitmq:15672/
# Test DNS routing
curl -H "Host: rabbitmq.localhost" http://localhost/
# Test authentication endpoint
curl -u rabbitmq-admin:$RABBITMQ_PASSWORD http://rabbitmq.localhost/api/overview
AMQP Connectivity Testing
# Test AMQP port connectivity
kubectl run test-pod --image=busybox --rm -it -- \
nc -zv rabbitmq.default.svc.cluster.local 5672
# Test management API
kubectl exec -it rabbitmq-0 -- \
rabbitmqctl status
🎯 Common Administration Tasks
Message Queue Workflows
Basic Pub/Sub Setup
- Create Exchange: Name:
events, Type:fanout - Create Queues:
notifications,logging,analytics - Bind Queues: Bind all queues to
eventsexchange - Test Publishing: Send message to
eventsexchange - Verify Distribution: Check messages appear in all queues
Topic-Based Routing
- Create Exchange: Name:
logs, Type:topic - Create Queues:
error.logs,info.logs,debug.logs - Bind with Patterns:
error.logs←*.error.*info.logs←*.info.*debug.logs←*.debug.*
- Test Routing: Publish with routing keys like
app.error.auth
User & Permission Setup
Application User Creation
- Create User: Username:
app-service, Password:[secure-password] - Set Tags:
none(no administrative access) - Virtual Host: Grant access to
/(default vhost) - Permissions:
- Configure:
app\..*(can create resources matching pattern) - Write:
app\..*(can publish to matching resources) - Read:
app\..*(can consume from matching resources)
- Configure:
Monitoring User Setup
- Create User: Username:
monitor, Password:[monitor-password] - Set Tags:
monitoring(read-only monitoring access) - Virtual Host: Grant access to
/ - Permissions: Read-only access to view statistics
Performance Optimization
Queue Configuration
# Through Management UI - Queue Arguments:
# x-max-length: 10000 # Maximum queue size
# x-message-ttl: 3600000 # Message TTL (1 hour)
# x-max-priority: 10 # Priority queue support
# x-dead-letter-exchange: dlx # Dead letter handling
Memory Management
- Queue Memory: Monitor per-queue memory usage
- Message Paging: Configure disk paging for large queues
- Memory Alarms: Set memory high watermark limits
- Disk Space: Monitor disk space for message persistence
🔧 Troubleshooting
Common Issues
Cannot Access Management UI:
# Verify RabbitMQ pod is running
kubectl describe pod -l app.kubernetes.io/name=rabbitmq
# Check management plugin status
kubectl exec -it rabbitmq-0 -- rabbitmq-plugins list
# Verify service endpoints
kubectl describe svc rabbitmq
Authentication Failures:
# Verify credentials in secrets
kubectl get secret urbalurba-secrets -o jsonpath='{.data.RABBITMQ_USERNAME}' | base64 -d
kubectl get secret urbalurba-secrets -o jsonpath='{.data.RABBITMQ_PASSWORD}' | base64 -d
# Check RabbitMQ user list
kubectl exec -it rabbitmq-0 -- rabbitmqctl list_users
Queue Connection Issues:
# Test AMQP connectivity
kubectl run test-pod --image=busybox --rm -it -- \
nc -zv rabbitmq.default.svc.cluster.local 5672
# Check RabbitMQ cluster status
kubectl exec -it rabbitmq-0 -- rabbitmqctl cluster_status
# View connection logs
kubectl logs -l app.kubernetes.io/name=rabbitmq --tail=50
Performance Issues:
# Check resource usage
kubectl top pod -l app.kubernetes.io/name=rabbitmq
# Monitor queue memory usage through management UI
# Navigate to Queues tab and check memory column
# Check disk space
kubectl exec -it rabbitmq-0 -- df -h
DNS Resolution Issues:
# Test DNS resolution
kubectl run test-pod --image=busybox --rm -it -- \
nslookup rabbitmq.default.svc.cluster.local
# Verify IngressRoute configuration
kubectl describe ingressroute rabbitmq-management
# Test different domain patterns
curl -H "Host: rabbitmq.localhost" http://127.0.0.1/
📋 Maintenance & Monitoring
Regular Maintenance Tasks
- Queue Monitoring: Check queue depths and consumer activity
- Connection Tracking: Monitor client connections and channels
- Memory Usage: Track broker memory and disk utilization
- User Access Review: Audit user permissions and access patterns
- Configuration Backup: Export broker configuration regularly
Backup Procedures
# Export RabbitMQ configuration
kubectl exec -it rabbitmq-0 -- rabbitmqctl export_definitions /tmp/definitions.json
# Copy configuration backup
kubectl cp rabbitmq-0:/tmp/definitions.json ./rabbitmq-definitions-backup.json
# Backup persistent data
kubectl exec -it rabbitmq-0 -- tar -czf /tmp/rabbitmq-data.tar.gz /bitnami/rabbitmq/mnesia
kubectl cp rabbitmq-0:/tmp/rabbitmq-data.tar.gz ./rabbitmq-data-backup.tar.gz
Performance Monitoring
# Through Management UI:
# - Overview: Global message rates and resource usage
# - Queues: Per-queue statistics and memory usage
# - Connections: Client connection details and data rates
# - Channels: Channel-level statistics and flow control
# - Exchanges: Message routing statistics
Disaster Recovery
# Restore configuration (after RabbitMQ restart)
kubectl cp ./rabbitmq-definitions-backup.json rabbitmq-0:/tmp/definitions.json
kubectl exec -it rabbitmq-0 -- rabbitmqctl import_definitions /tmp/definitions.json
# Restore data files (requires pod restart)
kubectl cp ./rabbitmq-data-backup.tar.gz rabbitmq-0:/tmp/rabbitmq-data.tar.gz
kubectl exec -it rabbitmq-0 -- tar -xzf /tmp/rabbitmq-data.tar.gz -C /
📚 Related Documentation
- package-queues-rabbitmq.md - RabbitMQ deployment and configuration
- rules-ingress-traefik.md - Traefik IngressRoute configuration standards
- secrets-management-readme.md - Managing RabbitMQ credentials in urbalurba-secrets
🔗 External Resources
- RabbitMQ Management Plugin Documentation - Official management UI guide
- RabbitMQ Admin Guide - Administrative operations reference
- AMQP 0-9-1 Protocol - Protocol specification and concepts
💡 Key Insight: The RabbitMQ Management Interface provides comprehensive administrative control over the message broker through an intuitive web interface. Unlike separate management tools, it's integrated directly into RabbitMQ and offers real-time monitoring, queue management, and user administration in a single interface accessible via standard cluster DNS routing.