v0.3.0 — three verbs on Redis Streams - #1
Merged
Merged
Conversation
Replace the single-verb model (Pool + Scheduler + emit) with Moleculer's semantic surface carried on Redis Streams: call, dispatch and emit, with a message envelope, cascading deadlines and typed errors. Pool and Scheduler merge into one Service, because the moment a handler calls another action its process is both executant and caller — the split forced one domain to live in two files. Adds per-message ttl and delay, request correlation (rid/level/caller/meta), pydantic params validation, dispatch task records, and runtime switches that pause a service or registration without a deploy. Fixes two live 0.2 bugs found on the way: idle workers reconnected every few seconds because redis-py's default socket_timeout is exactly the runtime's XREADGROUP BLOCK window, and the connection pool was never sized to the topology. Also hardens the worker loop, which previously let any failure outside a handler's own guard kill the process. Breaking: the public API and the Redis keyspace both change, so 0.2 and 0.3 cannot interoperate. See CHANGELOG.md. 153 tests, 96% coverage, green on fakeredis and real Redis. Co-Authored-By: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace the single-verb model (Pool + Scheduler + emit) with Moleculer's semantic surface carried on Redis Streams: call, dispatch and emit, with a message envelope, cascading deadlines and typed errors.
Pool and Scheduler merge into one Service, because the moment a handler calls another action its process is both executant and caller — the split forced one domain to live in two files.
Adds per-message ttl and delay, request correlation (rid/level/caller/meta), pydantic params validation, dispatch task records, and runtime switches that pause a service or registration without a deploy.
Fixes two live 0.2 bugs found on the way: idle workers reconnected every few seconds because redis-py's default socket_timeout is exactly the runtime's XREADGROUP BLOCK window, and the connection pool was never sized to the topology. Also hardens the worker loop, which previously let any failure outside a handler's own guard kill the process.
Breaking: the public API and the Redis keyspace both change, so 0.2 and 0.3 cannot interoperate. See CHANGELOG.md.
153 tests, 96% coverage, green on fakeredis and real Redis.