# RouteMQ Framework Documentation

{% hint style="warning" %}
RouteMQ **isn’t production-ready** yet. Use only in test/staging. Known gaps: stability, security hardening, performance tuning, docs. I’ll post updates as we land fixes.
{% endhint %}

<figure><img src="https://2369420694-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FE1dRtBHpZrBJRys1o8b3%2Fuploads%2FNWxe4beo3jVX0wSKuGSd%2FLogo1-500x500.png?alt=media&#x26;token=60af976d-6b76-4608-8b76-6acc0fd20b4a" alt=""><figcaption></figcaption></figure>

Welcome to the RouteMQ Framework documentation! This guide will help you get started and master all the features of this flexible MQTT routing framework.

## Table of Contents

* [Getting Started](https://routemq.cyb0x1.id/getting-started) - Installation, quick start, and basic setup
* [Core Concepts](https://routemq.cyb0x1.id/core-concepts) - Understanding the framework architecture
* [Configuration](https://routemq.cyb0x1.id/configuration) - Environment variables and setup options
* [Routing](https://routemq.cyb0x1.id/routing) - Route definition, parameters, and organization
* [Controllers](https://routemq.cyb0x1.id/controllers) - Creating and organizing business logic
* [Middleware](https://routemq.cyb0x1.id/middleware) - Request processing and middleware chains
* [Redis Integration](https://routemq.cyb0x1.id/redis) - Caching, sessions, and distributed features
* [Rate Limiting](https://routemq.cyb0x1.id/rate-limiting) - Advanced rate limiting strategies
* [Database](https://routemq.cyb0x1.id/database) - MySQL integration and models
* [Testing](https://routemq.cyb0x1.id/testing) - Writing and running tests
* [Deployment](https://routemq.cyb0x1.id/deployment) - Docker, production setup, and scaling
* [Monitoring](https://routemq.cyb0x1.id/monitoring) - Metrics, health checks, and debugging
* [API Reference](https://routemq.cyb0x1.id/api-reference) - Complete API documentation
* [Examples](https://routemq.cyb0x1.id/examples) - Practical examples and use cases
* [Troubleshooting](https://routemq.cyb0x1.id/troubleshooting) - Common issues and solutions

## Quick Links

* [Installation Guide](https://routemq.cyb0x1.id/getting-started/installation)
* [Your First Route](https://routemq.cyb0x1.id/getting-started/first-route)
* [Configuration Reference](https://routemq.cyb0x1.id/configuration/environment-variables)
* [Best Practices](https://routemq.cyb0x1.id/broken-reference)
* [FAQ](https://routemq.cyb0x1.id/faq)

## About RouteMQ

RouteMQ is a flexible MQTT routing framework with middleware support, dynamic router loading, Redis integration, and horizontal scaling capabilities, inspired by web frameworks.

### Key Features

* **Dynamic Router Loading**: Automatically discover and load routes from multiple files
* **Route-based MQTT topic handling**: Define routes using a clean, expressive syntax
* **Middleware support**: Process messages through middleware chains
* **Parameter extraction**: Extract variables from MQTT topics using Laravel-style syntax
* **Shared Subscriptions**: Horizontal scaling with worker processes for high-throughput routes
* **Redis Integration**: Optional Redis support for distributed caching and rate limiting
* **Advanced Rate Limiting**: Multiple rate limiting strategies with Redis backend
* **Optional MySQL integration**: Use with or without a database
* **Group-based routing**: Group routes with shared prefixes and middleware
* **Context manager for route groups**: Use Python's `with` statement for cleaner route definitions
* **Environment-based configuration**: Flexible configuration through .env files
* **Comprehensive logging**: Built-in logging with configurable levels


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://routemq.cyb0x1.id/readme.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
