Upgrading
Docs for other versions and what changed
The version picker in the top bar switches between the latest docs and the docs of every release, keeping you on the same page when it exists there. All versions lists each release with its tag, its docs, the release notes when there are any, and a GitHub compare link to the release before it, such as https://github.com/NimzyMaina/RillKit/compare/v0.1.0...v0.1.1. The compare view is the complete list of changes between two releases.
From 0.2 to 0.3
Single-server users with the default keys: nothing changes. Stream, DLQ, heartbeat and Idempotent keys are identical.
New:
RILLKIT_HOST,RILLKIT_PORT,RILLKIT_DB,RILLKIT_USERNAME,RILLKIT_PASSWORD,RILLKIT_SSLandRILLKIT_SOCKET_TIMEOUT, each winning over itsREDIS_name. A URL still replaces the separate fields; setting one of them next to a URL now logs a warning. See environment variables.KeyBuilder.idempotency(stream, key):Idempotentmarkers follow the broker's key builder, so brokers with different prefixes or tenants no longer share them. SeeIdempotentmarkers.- A consumer registry per stream and group (
KeyBuilder.consumers).active_workersreads it instead of scanning for heartbeat keys, so it works for ACL users that may not runSCAN. See several tenants on one server for an ACL rule that hides other tenants' key names.
For everyone: active_workers only lists workers running 0.3 or newer, since older workers write no registry entry. Upgrade all workers of a group together, or expect older ones to be missing from active_workers until they are upgraded. Heartbeat keys themselves are unchanged.
Changes for HashTagKeys users (clusters, or RILLKIT_KEY_LAYOUT=hashtag):
Idempotentmarkers move fromrillkit:done:<stream>:<key>tork:{<stream>}:done:<key>(with your prefix and tenant). Markers written by 0.2 are not checked, so a message redelivered right after the upgrade can be processed once more. PassIdempotent(prefix="rillkit:done:")to keep the 0.2 location.- Colons in stream names are now percent-encoded inside the tag: stream
orders:eumoves fromrk:{orders:eu}:streamtork:{orders%3Aeu}:stream, and the same for its DLQ and heartbeats. Streams without a colon keep their keys. In 0.2, streamt-42:ordersand streamorderswith tenantt-42shared keys; they no longer can. Drain or move affected streams before upgrading (pending entries and DLQ entries stay under the old keys). - An empty stream name raises
ConfigurationErrorinstead of producing keys that do not share a slot. - Custom
KeyBuildersubclasses keeprillkit:done:<stream>:<key>for markers unless they overrideidempotency.
From 0.1 to 0.2: Redis and Valkey support
Nothing changes for an existing Redis deployment. Upgrade and keep your configuration:
- Redis (redis-py) is still the default and the only required dependency.
REDIS_URLand the otherREDIS_*variables work as before, includingBroker.from_env(prefix=...).- Standalone key names are unchanged (
orders,orders-dlq,rillkit:workers:...), so pending messages, DLQs and heartbeats carry over. Broker(client=...),Broker(url)andBroker(settings=...)behave the same, andstop()still closes the client.
New, all optional:
pip install "rillkit[valkey]"andSettings(backend="valkey")(orRILLKIT_BACKEND=valkey) to use valkey-py.Settings(mode="cluster", cluster_nodes=[...])(orRILLKIT_MODE=cluster) for Redis Cluster and Valkey Cluster. See Redis and Valkey Cluster.- Key builders that map logical stream names to physical keys, with prefixes and tenants. See Keys.
RILLKIT_*environment variables:RILLKIT_URL,RILLKIT_HOST,RILLKIT_PORT,RILLKIT_DB,RILLKIT_USERNAME,RILLKIT_PASSWORD,RILLKIT_SSL,RILLKIT_SOCKET_TIMEOUT, plusRILLKIT_BACKEND,RILLKIT_MODE,RILLKIT_CLUSTER_NODESandRILLKIT_KEY_LAYOUT. EachRILLKIT_connection variable wins over itsREDIS_name; moving to them is optional.REDIS_USERNAMEis new for ACL users.Settings(username=..., client_kwargs={...})to pass any client option.Broker(keys=...),broker.keys,msg.key, andPlainKeys,HashTagKeys,KeyBuilder.ConfigurationErrorfor bad settings.
Small differences to check:
client_kwargsoptions are validated: an option the client does not accept, or one that has its ownSettingsfield, raisesConfigurationErrorwhen the client is built.Settings(url=..., password=...)used to ignorepassword. Nowusernameandpasswordfill in when the URL has no credentials of its own (credentials in the URL still win).Settings.from_env()is unaffected: it does not readREDIS_PASSWORDwhen a URL is set.repr(Settings(...))lists the new fields and hides passwords.- A
redis.RedisClusterpassed asBroker(client=...)now uses hash-tagged keys (rk:{orders}:stream). RillKit 0.1 did not support clusters; if you ran one anyway with the plain names, keep them withBroker(client=..., keys=PlainKeys()).