Registry / database / integreat-adapter-redis

integreat-adapter-redis

JSON →
library0.4.7jsnpmunverified

A Redis adapter for the Integreat data integration library, allowing Integreat to read and write data to Redis databases. Version 0.4.7 is the latest stable release, with occasional updates. It wraps node_redis and supports connection options, prefix-based namespacing, and concurrency control. Differentiators: specialized for Integreat's action-based data flow, with built-in support for key/value storage, list operations, and TTL management. Requires Node >=14 and Integreat v0.8.

npm install integreat-adapter-redis
INSTALL
IMPORT
SIG · INTEGREAT-ADAPTER-
I
integreat-adapter-redis
databasejavascriptv0.4.7
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

redisAdapter
import redisAdapter from 'integreat-adapter-redis'
import { redisAdapter } from 'integreat-adapter-redis'
The package uses a default export. Named import will not work.
default
const redisAdapter = require('integreat-adapter-redis')
const { default: redisAdapter } = require('integreat-adapter-redis')
CJS require returns the default export directly, no need to destructure default.
Types (TypeScript)
import type { AdapterOptions } from 'integreat-adapter-redis'
import { AdapterOptions } from 'integreat-adapter-redis'
For type imports, use 'import type' to avoid runtime side effects. The type is not a value export.

Shows how to import the Redis adapter, create Integreat with the adapter, and define a source configuration for Redis.

import integreat from 'integreat'; import redisAdapter from 'integreat-adapter-redis'; const resources = integreat.resources({ transporters: { redis: redisAdapter } }); const great = Integreat.create(defs, resources); // Example source configuration const sourceConfig = { id: 'store', adapter: 'redis', endpoints: [{ options: { prefix: 'store', redis: { host: 'localhost', port: 6379 }, concurrency: 5, useTypeAsPrefix: true } }] };
Debug
Known issues
gotchaThe adapter uses 'useTypeAsPrefix' defaulting to true, which may cause unexpected key names if not configured.
fix
Set useTypeAsPrefix: false in endpoint options if you don't want the type to be prepended to keys.
affects: >=0.0.0
breakingRequires Integreat v0.8 or higher; older versions are incompatible.
fix
Upgrade Integreat to v0.8+.
affects: >=0.0.0
deprecatedThe underlying node_redis package is deprecated in favor of 'redis' v4, but this adapter still uses node_redis.
fix
Monitor for updates that might switch to redis v4, or pin to older node_redis.
affects: >=0.4.0
gotchaThe adapter passes redis options directly to redis.createClient(); invalid options may cause connection errors without clear messages.
fix
Validate redis options against node_redis documentation before passing.
affects: >=0.0.0
gotchaConcurrency setting controls the maximum number of parallel requests to Redis, but setting too high may overwhelm the server.
fix
Set concurrency to a conservative value based on your Redis server capacity (e.g., 5-10).
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: redis.createClient is not a function
Using a newer version of the 'redis' package (v4) which has a different API (createClient is not a function).
fix
Install an older version of node_redis: npm install redis@3
Error: Integreat v0.8 or higher required.
Integreat version is below 0.8, which is incompatible.
fix
Update Integreat to v0.8+: npm install integreat@0.8
Error: Redis connection to localhost:6379 failed - connect ECONNREFUSED
Redis server is not running or address/port is incorrect.
fix
Ensure Redis server is running on the specified host and port, or update the redis options in endpoint config.
Upgrade
Version history
0.4.7latest on npm
Audit
Dependencies
redisrequiredRedis client (node_redis) used for database connectivity
integreatrequiredPeer dependency; adapter designed to work with Integreat v0.8+
Agent activity
8 hits · last 30 days
node
8
Resources
integreat-adapter-redis — npm install integreat-adapter-redis · libregistry