Skip to content

mrtstg/streams-broker-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

streams-broker-rs

About

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.

How it works?

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.

Some details

  • 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/

Config variables

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.

TODO's

  • Basic operations with keys
  • Advanced message insert
  • Consumer stats and management
  • Changing config file path using env

About

Simple RPC server over redis streams

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published