Giter Club home page Giter Club logo

simple-redis-stream's Introduction

Redis Stream Consumer Group example

This is a simple example of Redis Stream Consumer Group

Provider

go run provider/provider.go -password mypassword -stream mystream2 -name P-2 -time 1000

Starts a provider on localhost:6379 with name P-2 writing messages into mystream2 stream with 1000 ms time interval.

Consumer

go run consumer/consumer.go -password mypassword -group Group-1 -name C-1 -time 200 mystream2 ">"

Starts a consumer on localhost:6379 and creates a group Group-1, if it is not exists. Consumer listen the stream mystream2 and it waits 200 ms before acknowledge(XACK) the message. The consumer can be set up to listen more streams with adding the streams and ID.

... mystream2 newstream ">" ">"

1 provider - N consumer setup

go run provider/provider.go -password mypassword -stream mystream2 -name P-2 -time 1000

go run consumer/consumer.go -password mypassword -group Group-1 -name C-1 -time 200 mystream2 ">"

go run consumer/consumer.go -password mypassword -group Group-1 -name C-2 -time 200 mystream2 ">"

go run consumer/consumer.go -password mypassword -group Group-1 -name C-3 -time 200 mystream2 ">"

simple-redis-stream's People

Contributors

tkircsi avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.