# CybusMQ

CybusMQ is a robust MQTT broker tailored for industrial applications, offering support for both MQTT 5 and MQTT 3.1.1 protocols. It serves as the central message broker within the Connectware ecosystem, facilitating efficient data exchange and inter-service communication.

## Key Features

* **Industrial-grade stability and scalability**: Engineered to withstand the demands of industrial environments, ensuring reliable performance under high-load conditions. See [Scaling the Broker Cluster](/broker/cybusmq/operations/scaling-the-broker-cluster.md) for scaling strategies.
* **Protocol support**: Offers services for MQTT, secure MQTT over TLS (MQTTS), and MQTT over WebSockets, providing flexibility in communication methods. See [Collocated One-way and Mutual TLS](/broker/cybusmq/configuration/collocated-tls-configuration.md) for TLS configuration details.
* **Metrics exposure**: Exposes comprehensive usage and performance metrics for integration with monitoring systems like Prometheus and Grafana. See [Monitoring & Analytics](/broker/cybusmq/configuration/monitoring-and-analytics.md) for details.
* **Authentication delegation**: Employs webhooks to delegate authentication processes to the Auth-Server, ensuring secure access control. See [Self-Refreshing Webhooks Cache](/broker/cybusmq/configuration/self-refreshing-webhooks-cache.md) for implementation details.

## Technical Specifications

* **Foundation**: CybusMQ is built on VerneMQ, a high-performance distributed MQTT message broker. This foundation provides robust messaging capabilities across distributed systems.
* **Technology stack**: CybusMQ is written in Erlang, a language optimized for concurrent operations and fault tolerance. The Erlang/OTP virtual machine uses preemptive scheduling, delivering consistent low latency for real-time applications at scale.
* **Configuration**: CybusMQ can be configured through environment variables and configuration files. See [Configuration Options](/broker/cybusmq/configuration.md) and [Environment Variables](/broker/cybusmq/environment-variables.md) for available settings.

For a detailed comparison between CybusMQ and VerneMQ, see [Feature Overview](#feature-overview).

## Feature Overview

Comparison between CybusMQ and VerneMQ, highlighting the advantages of CybusMQ.

| Feature                                                                                                                   | CybusMQ                                                                                      | VerneMQ                                                                             | CybusMQ Advantage                                                   |
| ------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------- | ------------------------------------------------------------------- |
| **Performance & Scalability**                                                                                             |                                                                                              |                                                                                     |                                                                     |
| [Message Deduplication for Overlapping Subscriptions](/broker/cybusmq/configuration/duplicate-message-delivery.md)        | Configurable single/multiple delivery                                                        | Multiple delivery                                                                   | Reduced network overhead and simplified client implementation       |
| [Synchronous SUBSCRIBE Handling](/broker/cybusmq/configuration/synchronous-subscribe-handling.md)                         | Synchronous processing at cluster level                                                      | Asynchronous processing                                                             | Better control over subscription acknowledgments                    |
| **Clustering & High Availability**                                                                                        |                                                                                              |                                                                                     |                                                                     |
| [Continuous Cluster Discovery in Kubernetes](/broker/cybusmq/configuration/continuous-cluster-discovery-in-kubernetes.md) | Periodic discovery attempts at runtime                                                       | Single cluster discovery attempt at startup                                         | Seamless scaling and node management in cloud environments          |
| [Clustering Connection Improvements](/broker/cybusmq/configuration/clustering-connections.md)                             | Detached queue and sender tolerating network instabilities, multithreaded routing on receive | Single sender/queue sensitive to network delays, single-threaded routing on receive | Better cluster stability and performance                            |
| [Metadata Store Improvements](/broker/cybusmq/configuration/metadata-store.md)                                            | Improved data structures, optimizations, faster initial sync                                 | Upscale is slow and memory-intensive for aged replicas                              | Faster initial sync when cluster is upscaled, better memory profile |
| **Security**                                                                                                              |                                                                                              |                                                                                     |                                                                     |
| [Collocated One-way and Mutual TLS](/broker/cybusmq/configuration/collocated-tls-configuration.md)                        | Flexible TLS configuration options                                                           | Separate listeners needed for one-way and mutual TLS                                | Simplified client configuration and network maintenance             |
| [Self-Refreshing Webhooks Cache](/broker/cybusmq/configuration/self-refreshing-webhooks-cache.md)                         | Detached authentication updates from publish processing                                      | Trial and error expiration strategy during publish processing                       | No delayed message forwarding due to authentication                 |


---

# 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://docs.cybus.io/broker/cybusmq.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.
