redis-queue-rs-0.1.3 has been yanked.
RedisQueueRS
A simple Redis queue implementation in Rust.
This project ofers two implementations: RedisQueue
and AsyncRedisQueue
.
Both of them are based on the same RedisQueue struct and are thread safe due to the use of a Redis key based lock,
but the AsyncRedisQueue uses async/await to handle the Redis connection.
This project is considered a work in progress and is not yet ready for production use.
Advantages of a Redis Queue
- Decoupling: The producer and the consumer are decoupled. The producer can produce messages without worrying about the consumer.
- Scalability: The producer and the consumer can be scaled independently.
- Reliability: The queue can be used to store messages in case of failure.
- Asynchronous Communication: The producer and the consumer can be asynchronous.
- Load Balancing: The queue can be used to balance the load between multiple consumers.
Installation
Add the following to your Cargo.toml:
[]
= "*"
Usage
RedisQueue - Synchronous Implementation
use RedisQueue;
use Client;
AsyncRedisQueue - Asynchronous Implementation
use AsyncRedisQueue;
use Client;
async
License
This project is licensed under the MIT License, feel free to use it in your projects :)