Mutiple Tenant
Overview
YedMQ's multiple tenant feature provides a robust and secure way to support multiple organizations on a single message broker infrastructure. This architecture ensures complete isolation between different tenants while maximizing resource utilization and reducing operational overhead.
Key Features
Tenant Isolation
- Namespace Isolation: Each tenant gets a dedicated namespace for their topics
- Connection Isolation: Separate connection pools for each tenant
- Security Boundaries: Complete message flow isolation between tenants###
How to set tenant id
YedMQ implements multi-tenant management primarily through its Authentication Plugin. When a new MQTT client attempts to establish a connection, the Authentication Plugin automatically intercepts the connection process, analyzes the client identify and username from the connection parameters, determines the tenant identity of the client, and returns the corresponding tenant ID.
Authentication Process
1. Connection Parameter Parsing
When a client initiates a connection, the Authentication Plugin receives the following key information:
- Client Identify: Unique client identifier
- Username: Username, typically containing tenant information
- Password: Authentication password
2. Tenant Identification Mechanism
YedMQ according the return value to get the tenant ID.
Example:
AuthenticationResultValue::Success("YOUR_TENANT_ID".into())