Giter Site home page Giter Site logo

bitspark / telstar Goto Github PK

View Code? Open in Web Editor NEW
5.0 5.0 2.0 231 KB

Telstar makes it easy to write consumer groups and producers against redis streams

License: MIT License

Python 92.59% Shell 7.41%
distributed-systems eventbus messaging python3 redis streams

telstar's People

Contributors

dependabot-preview[bot] avatar kairichard avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

salekseev

telstar's Issues

Add Backoff mechanics

Syntax Idea:

@app.consumer("extractor.v2", ["contentAdded"], backoff=True)
def method(record: Content):
    do_something()

`telstar.stage` does not dates

It throws TypeError: Object of type datetime is not JSON serializable when passed a dict with {"now": datetime.datetime.now()}

Add API to work with multiple streams at once

If you want to listen for n > 1 streams you need multiple instances of the consumer which is cumbersome and actually not needed as redis supports reading from multiple streams at once.

Add telstar admin capabilities

In order to understand an entire system one needs to have the ability to probe internals and derive a conclusion from them. That is why we need to have something along the lines of:

# create an admin object
admin = telstar.admin(redis.from_url("..."))
admin.get_streams()
admin.get_consumers()
admin.get_groups()

# A single stream also needs to be inspectable
[ stream ] = admin.get_streams()
stream.get_pending_messages()

# Inspect things that look dead
admin.get_dead_groups()
admin.get_dead_consumers()
admin.get_broken_messages()

# Maintenance methods
[group] = admin.get_dead_groups()
group.remove()

[consumer] = admin.get_dead_consumers()
consumer.remove()

[message] = admin.get_broken_messages()
message.ack()
message.mark_as_seen()
message.remove()

[stream] = admin.get_streams()
stream.trim(size=1000)

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.