bitspark / telstar Goto Github PK
View Code? Open in Web Editor NEWTelstar makes it easy to write consumer groups and producers against redis streams
License: MIT License
Telstar makes it easy to write consumer groups and producers against redis streams
License: MIT License
Syntax Idea:
@app.consumer("extractor.v2", ["contentAdded"], backoff=True)
def method(record: Content):
do_something()
It throws TypeError: Object of type datetime is not JSON serializable
when passed a dict
with {"now": datetime.datetime.now()}
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.
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)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.