streams-broker-rs - is a RPC server over redis streams, which allows to insert and read data from redis streams. You can see proto file here.
You can pass any string to broker using InsertMessage method and it will insert into stream in format "message" - your data. Using ReadMesssages method you can get array of strings from your string.
- Stream reading is using XGROUPREAD method, so using consumers is required. Server has RegisterGroup method for creating groups and streams.
- You can pull ready image from Docker hub
- Server tries to find file in parent folder, so in docker image volume file to /usr/local/bin/
Default config file is situated in "deployment" folder.
Variable | Description |
---|---|
service_ip | Address, which RPC server will serve |
service_port | Port, on which RPC server will be available |
redis_url | Redis connection string |
redis_pool_size | Amount of redis connections in pool |
log_level | Logs level |
default_block | Default block time (in ms) for XREAD operation |
Also, you can set any variable using virtual environment. For this, add field name and virtual environment variable name in [env_mapping] section.
For example, if we have line
log_level="LOG_LEVEL"
server will look up env. variable value "LOG_LEVEL" and if it doesn't exist will take variable from config file.
- Basic operations with keys
- Advanced message insert
- Consumer stats and management
- Changing config file path using env