Skip to main content

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 = 50
  • pool_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

simplebroker_redis-3.3.1.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

simplebroker_redis-3.3.1-py3-none-any.whl (31.8 kB view details)

Uploaded Python 3

File details

Details for the file simplebroker_redis-3.3.1.tar.gz.

File metadata

  • Download URL: simplebroker_redis-3.3.1.tar.gz
  • Upload date:
  • Size: 25.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for simplebroker_redis-3.3.1.tar.gz
Algorithm Hash digest
SHA256 18b89e4a5f8ecf824a3296b1152a1b5e3ce2e88ed63174d314fc8f91afc7489a
MD5 22c5f73ca398a5a3c94d97f6b24e5fb4
BLAKE2b-256 333a8dbaf4dba0053c2f493e9cae89fa19120e98f5414c789afe88ee963f87ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplebroker_redis-3.3.1.tar.gz:

Publisher: release-gate-redis.yml on VanL/simplebroker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file simplebroker_redis-3.3.1-py3-none-any.whl.

File metadata

File hashes

Hashes for simplebroker_redis-3.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 df95c1b9b76b30dd3d9f806adb83f206b451d050aca4b287608554e5f984a858
MD5 89b65dec9d5f992e3f0c5a16b86bc382
BLAKE2b-256 1b02668306e51a80068d1ec3b854c5faa43b9579c95c152313d33ae9fe346f31

See more details on using hashes here.

Provenance

The following attestation bundles were made for simplebroker_redis-3.3.1-py3-none-any.whl:

Publisher: release-gate-redis.yml on VanL/simplebroker

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

3.9.1

2 files

3.9.0

2 files

3.8.0

2 files

3.6.0

2 files

3.5.2

2 files

3.5.1

2 files

3.5.0

2 files

3.3.2

2 files

This release

3.3.1 This release

2 files

3.3.0

2 files

3.2.3

2 files

3.2.2

2 files

3.2.1

2 files

3.2.0

2 files

3.1.1

2 files

3.1.0

2 files

3.0.2

2 files

3.0.0

2 files

2.7.0

2 files

2.6.0

2 files

2.5.0

2 files

2.4.1

2 files

2.4.0

2 files

2.3.1

2 files

2.3.0

2 files

2.2.0

2 files

2.1.0

2 files

2.0.1

2 files

2.0.0

2 files

1.1.1

2 files

1.1.0

2 files

1.0.1

2 files

1.0.0

2 files

0.9.2

2 files

0.9.1

2 files

0.9.0

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page