/Producer2Consumer4Redis

The C language is used as the producer and the Python language is used as the consumer, and the data is transmitted in one direction through the Redis message queue. For transfer performance, use ProtoBuf for serialization and deserialization of data.

Primary LanguageC

Producer2Consumer4Redis

The C language is used as the producer and the Python language is used as the consumer, and the data is transmitted in one direction through the Redis message queue. For transfer performance, use ProtoBuf for serialization and deserialization of data.

编译

protoc --python_out=. incident.proto
protoc --c_out=. incident.proto
gcc -I/usr/local/include/hiredis producer4redis.c -lhiredis -o producer4redis
gcc producer4redis.c  incident.pb-c.c -o producer4redis -lprotobuf-c -lhiredis -I/usr/local/include/hiredis

参考