Registry / database / integreat-transporter-redis

integreat-transporter-redis

JSON →
library1.5.0jsnpmunverified

Redis transporter for Integreat v1.0+. Current stable version 1.5.0, released under the integreat-io organization. Allows Integreat to access and manipulate Redis hashes, with support for fetching single/multiple keys, pattern matching, and prefix customization. Differentiators: designed specifically for Integreat's action dispatching, with options for concurrency, TLS, and authentication. Requires Node >=18 and Integreat v1.0.

npm install integreat-transporter-redis
INSTALL
IMPORT
SIG · INTEGREAT-TRANSPOR
I
integreat-transporter-redis
databasejavascriptv1.5.0
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.

default
import redisTransporter from 'integreat-transporter-redis'
const redisTransporter = require('integreat-transporter-redis')
ESM-only package, default export is the transporter factory.
Integreat
import Integreat from 'integreat'
const Integreat = require('integreat')
Integreat is ESM-only since v1.0.
create
import { create } from 'integreat'
const { create } = require('integreat')
Alternatively use Integreat.create().

Initialize Integreat with Redis transporter and fetch all keys of type 'product'.

import Integreat from 'integreat' import redisTransporter from 'integreat-transporter-redis' const config = { sources: [{ id: 'store', transporter: 'redis', endpoints: [{ options: { prefix: 'store', redis: { uri: process.env.REDIS_URI ?? 'redis://localhost:6379' }, concurrency: 5 } }] }] } const great = Integreat.create(config, { transporters: { redis: redisTransporter() } }) // Fetch all keys with prefix 'store:' const { data } = await great.dispatch({ type: 'GET', payload: { type: 'product' } }) console.log(data)
Debug
Known issues
deprecatedNode versions < 18 are not supported
fix
Upgrade Node.js to version 18 or higher.
affects: >=1.0.0
breakingESM-only since v1.0.0, no CommonJS support
fix
Use import syntax or update to ESM project.
affects: >=1.0.0
gotchaRequires Integreat v1.0 or higher
fix
Ensure integreat version is at least 1.0.
affects: >=1.0.0
gotchaDefault option useTypeAsPrefix is true: key format is <type>:<id>
fix
Set useTypeAsPrefix: false if you want only id as key.
affects: >=1.0.0
gotchaConcurrency defaults to 1 (sequential fetches)
fix
Set concurrency option to higher number for parallel fetches.
affects: >=1.0.0
Errors
Common errors & fixes
Cannot find package 'integreat-transporter-redis'
Package not installed or name misspelled
fix
Run npm install integreat-transporter-redis
Error: connect ECONNREFUSED ::1:6379
Redis server not running or wrong host/port
fix
Start Redis server or set correct redis.uri in endpoint options.
TypeError: redisTransporter is not a function
Default import used incorrectly
fix
Use import redisTransporter from 'integreat-transporter-redis'
Integreat requires transporter 'redis' but it was not provided
Transporter not passed in options
fix
Pass transporters: { redis: redisTransporter() } to Integreat.create()
Upgrade
Version history
1.5.0latest on npm
Audit
Dependencies
integreatrequiredpeer dependency; the transporter is meant to be used with Integreat v1.0+
Agent activity
8 hits · last 30 days
node
8
Resources
integreat-transporter-redis — npm install integreat-transporter-redis · libregistry