v6.0.0: 6.0.0 (#520)
Breaking Changes in v6
Redis client upgraded from node-redis v3 to v6
getRedis() now returns a promise-based node-redis v6 client. The old callback-style API is gone.
What changed:
createRedisConnection()is nowasync— callers mustawaitit (or handle the returned promise) since orka now awaits the initial connection during boot before the server starts listening.getRedis()'s client no longer has callback-style methods — useawait redis.get('key')instead ofredis.get('key', (err, val) => ...).client.end()is gone — useclient.destroy()orclient.quit().- Health check (
isHealthy()) now reflectsclient.isReadyinstead of the removedconnectedproperty. - If Redis is unreachable at boot, the app now still starts (previously the old retry_strategy could throw and crash the process) —
/healthreports unhealthy instead.
What did not change:
config.redisschema is unchanged —url,options.tls, and the legacy retry/keepalive knobs (timesConnected,totalRetryTime,reconnectAfterMultiplier,socketKeepalive,socketInitialDelay) are still recognized and mapped internally to the new driver'ssocketoptions and reconnect strategy.- Wire protocol reply shapes are preserved — orka pins
RESP: 2by default. Setconfig.redis.options.RESP = 3to opt into RESP3 (node-redis v6's new default) if you're ready for the shape changes that come with it. - Any other key under
config.redis.options(e.g.pingInterval,socket) passes through tocreateClientunchanged.
Migration steps for consumers:
await createRedisConnection(config)wherever it's called directly (most consumers go through orka's boot sequence, which already awaits it).- Replace any callback-style Redis calls (
redis.get(key, cb)) withawait/promise usage (await redis.get(key)). - Replace
client.end()calls withclient.destroy(). - If you relied on
isHealthy()/connected, no change needed — it's handled internally now viaisReady.
See README.md → "Redis client (node-redis v6)" for full config details.
Full commit reference: 0362c9b — "Migrate redis from v3 to v6".