thingsboard / tbmq

Open-source, scalable, and fault-tolerant MQTT broker able to handle 4M+ concurrent client connections, supporting at least 3M messages per second throughput per single cluster node with low latency delivery. The cluster mode supports more than 100M concurrently connected clients.
https://thingsboard.io/products/mqtt-broker/
Apache License 2.0
594 stars 49 forks source link

Migration of Device publish messages handling from Jedis to Lettuce #174

Closed ShvaykaD closed 1 month ago

ShvaykaD commented 1 month ago

Pull Request description

This PR migrates the device publish message saving logic from Jedis to Lettuce for improved performance and scalability. Key changes include:

Asynchronous Operations:

Replaced Jedis sync operations with Lettuce's non-blocking RedisAsyncCommands for better throughput in high-load scenarios.

Pipelining for Performance:

Added pipelining with auto-flush based on time and buffer size, optimizing Redis command execution and reducing latency. This migration enhances performance and ensures compatibility with both Redis standalone and cluster setups.

General checklist

Front-End feature checklist

Back-End feature checklist