simplebroker-redis
Valkey/Redis backend extension for SimpleBroker.
This package exposes the public SimpleBroker backend name redis. It targets
Valkey 7.x and Redis 7.x and the test suite runs against Valkey.
Requirements
- Python 3.11+
- Valkey 7.x or Redis 7.x
Durability depends on the server configuration. A Valkey or Redis deployment without AOF/RDB persistence can lose messages on restart. Use SQLite or Postgres when you need storage durability from the broker stack by default.
Regular broker commands use a redis-py BlockingConnectionPool owned by the
process-local Redis runner. Pub/Sub wake hints use a separate dedicated
connection because subscribed Redis connections cannot serve normal commands.
Pool defaults:
max_connections = 50pool_timeout = BROKER_BUSY_TIMEOUT / 1000
The defaults can be overridden in project backend options:
[backend_options]
namespace = "simplebroker_redis_v1"
max_connections = 50
pool_timeout = 5.0
Pool exhaustion is bounded by pool_timeout and surfaces as an operational
error from broker operations.
Concurrency semantics
Queue deletion is atomic per queue. delete() first snapshots the queue
registry, then one Lua invocation per selected queue rechecks active
at-least-once reservations and removes that queue's pending, claimed, body,
and global-ID state together. A queue created after the registry snapshot is
outside the operation and is not deleted. If a reservation starts between
per-queue invocations, deletion stops with an error; queues already processed
remain deleted, while that reserved queue and later queues remain intact.
Patternless broadcast() selects the current queue registry and inserts every
copy in one Lua invocation. A queue cannot be missed or resurrected by a
concurrent write or deletion that commits before that invocation. Activity
notifications and maintenance accounting run after the atomic insert commits.
Exact-target broadcast(..., queue_names=...) also intersects the requested
literal names with the registry and inserts all copies in one Lua invocation.
Missing names are ignored and not created. A requested queue deleted before
the script selects targets is not resurrected; an all-missing request returns
zero without advancing persisted last_ts, publishing wakeups, or scheduling
maintenance.
Python create_missing=True changes exact selection to the complete requested
set. The script validates all anticipated failures before its first mutation,
then adds missing names to the registry and inserts every message in one
non-interleaved Lua phase. A queue deleted before that phase is intentionally
recreated.
Patterned broadcasts deliberately keep a client-side queue snapshot so their
matching stays exactly Python fnmatchcase syntax. A queue created after the
snapshot can miss that broadcast; a queue deleted after the snapshot can be
recreated by it. Use a patternless or exact-target broadcast when atomic
registry selection is required.
Exact-target broadcast requires backend API v5: SimpleBroker 5.6.1 or newer
and simplebroker-redis 3.3.1 or newer.
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file simplebroker_redis-3.3.2.tar.gz.
File metadata
- Download URL: simplebroker_redis-3.3.2.tar.gz
- Upload date:
- Size: 25.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7568115f68f847c9bb35539d4cdc8af0df79338a5a88c8a9cde8332945277f8b
|
|
| MD5 |
8fee38814fff43655e194449f13cd2fc
|
|
| BLAKE2b-256 |
14355bf1ef094a60b2d7b3b497c86f32e3f26d881df00799498aba7a811f10f4
|
Provenance
The following attestation bundles were made for simplebroker_redis-3.3.2.tar.gz:
Publisher:
release-gate-redis.yml on VanL/simplebroker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplebroker_redis-3.3.2.tar.gz -
Subject digest:
7568115f68f847c9bb35539d4cdc8af0df79338a5a88c8a9cde8332945277f8b - Sigstore transparency entry: 2289621527
- Sigstore integration time:
-
Permalink:
VanL/simplebroker@79815a462332f8f26f98e2239a789784b7964bbe -
Branch / Tag:
refs/tags/simplebroker_redis/v3.3.2 - Owner: https://github.com/VanL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-gate-redis.yml@79815a462332f8f26f98e2239a789784b7964bbe -
Trigger Event:
push
-
Statement type:
File details
Details for the file simplebroker_redis-3.3.2-py3-none-any.whl.
File metadata
- Download URL: simplebroker_redis-3.3.2-py3-none-any.whl
- Upload date:
- Size: 32.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62ca3a26f72e33342fd4b0f1a04121817774faf5dfb3a37aa1299559709715e4
|
|
| MD5 |
fb4f8fa0b1239546a8d6d99fec5bced7
|
|
| BLAKE2b-256 |
0565ab1bc41a37d0e5f3a60b342529d11f83525e78cf50660409f86a92d90311
|
Provenance
The following attestation bundles were made for simplebroker_redis-3.3.2-py3-none-any.whl:
Publisher:
release-gate-redis.yml on VanL/simplebroker
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
simplebroker_redis-3.3.2-py3-none-any.whl -
Subject digest:
62ca3a26f72e33342fd4b0f1a04121817774faf5dfb3a37aa1299559709715e4 - Sigstore transparency entry: 2289621577
- Sigstore integration time:
-
Permalink:
VanL/simplebroker@79815a462332f8f26f98e2239a789784b7964bbe -
Branch / Tag:
refs/tags/simplebroker_redis/v3.3.2 - Owner: https://github.com/VanL
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-gate-redis.yml@79815a462332f8f26f98e2239a789784b7964bbe -
Trigger Event:
push
-
Statement type: