| Copyright | (c) Gargantext 2024-Present |
|---|---|
| License | AGPL |
| Maintainer | gargantext@iscpif.fr |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | None |
| Language | Haskell2010 |
Async.Worker.Broker.Redis
Description
Based on lists: https:/redis.ioglossaryredis-queue
The design is as follows: - for each queue we have an 'id counter' - each queue is represented as a set of message ids - each message is stored under unique key, derived from its id - the above allows us to have an archive with messages - deleting a message means removing it's unique key from Redis
The queue itself is a list, the archive is a set (so that we can use SISMEMBER).
Synopsis
- data RedisBroker
- data family BrokerInitParams b a
- data RedisWithMsgId a = RedisWithMsgId {}
Documentation
data RedisBroker Source #
Instances
data family BrokerInitParams b a #
All the parameters needed for broker intialization
Instances
| data BrokerInitParams RedisBroker a Source # | |
Defined in Async.Worker.Broker.Redis | |
data RedisWithMsgId a Source #
Helper datatype to store message with a unique id.
We fetch the id by using INCR
https://redis.io/docs/latest/commands/incr/
Constructors
| RedisWithMsgId | |
Instances
| FromJSON a => FromJSON (RedisWithMsgId a) Source # | |
Defined in Async.Worker.Broker.Redis Methods parseJSON :: Value -> Parser (RedisWithMsgId a) # parseJSONList :: Value -> Parser [RedisWithMsgId a] # omittedField :: Maybe (RedisWithMsgId a) # | |
| ToJSON a => ToJSON (RedisWithMsgId a) Source # | |
Defined in Async.Worker.Broker.Redis Methods toJSON :: RedisWithMsgId a -> Value # toEncoding :: RedisWithMsgId a -> Encoding # toJSONList :: [RedisWithMsgId a] -> Value # toEncodingList :: [RedisWithMsgId a] -> Encoding # omitField :: RedisWithMsgId a -> Bool # | |
| Show a => Show (RedisWithMsgId a) Source # | |
Defined in Async.Worker.Broker.Redis Methods showsPrec :: Int -> RedisWithMsgId a -> ShowS # show :: RedisWithMsgId a -> String # showList :: [RedisWithMsgId a] -> ShowS # | |
| Eq a => Eq (RedisWithMsgId a) Source # | |
Defined in Async.Worker.Broker.Redis Methods (==) :: RedisWithMsgId a -> RedisWithMsgId a -> Bool # (/=) :: RedisWithMsgId a -> RedisWithMsgId a -> Bool # | |