{"id":44252,"library":"amphora-event-bus-redis","title":"Amphora Event Bus Redis","description":"A Redis-based event bus module for Amphora CMS that enriches published messages with additional context. Compatible with Amphora v7.1.0. This is an alternative to the default in-memory or simple bus, providing persistence and cross-process communication via Redis. It uses the same CLAY_BUS_HOST environment variable as Amphora's default bus and respects topic namespaces. The module must be passed to Amphora's eventBus option. It is a small, focused package with minimal dependencies, suited for production deployments requiring reliable event distribution across multiple Amphora instances.","status":"active","version":"0.0.1","language":"javascript","source_language":"en","source_url":null,"tags":["javascript"],"install":[{"cmd":"npm install amphora-event-bus-redis","lang":"bash","label":"npm"},{"cmd":"yarn add amphora-event-bus-redis","lang":"bash","label":"yarn"},{"cmd":"pnpm add amphora-event-bus-redis","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"The package does not provide an ESM export; use CommonJS require().","wrong":"import eventBus from 'amphora-event-bus-redis'","symbol":"default","correct":"const eventBus = require('amphora-event-bus-redis')"}],"quickstart":{"code":"const express = require('express');\nconst amphora = require('amphora');\nconst eventBus = require('amphora-event-bus-redis');\nconst app = express();\n\n// Ensure CLAY_BUS_HOST is set, e.g., process.env.CLAY_BUS_HOST = 'redis://localhost:6379';\n\namphora({\n  app,\n  renderers: {},\n  providers: [],\n  plugins: [],\n  storage: require('amphora-storage-postgres'),\n  eventBus: eventBus\n}).then(() => {\n  app.listen(3000, () => console.log('Amphora with Redis event bus running'));\n});","lang":"javascript","description":"Initializes Amphora with the Redis event bus module, assuming CLAY_BUS_HOST env var is set."},"warnings":[{"fix":"Set the environment variable before starting the application: export CLAY_BUS_HOST=redis://localhost:6379","message":"Must set CLAY_BUS_HOST environment variable, otherwise the Redis connection will fail silently or use default connection settings.","severity":"gotcha","affected_versions":">=0.0.1"},{"fix":"Ensure Amphora version is exactly ^7.1.0.","message":"Only compatible with Amphora v7.1.0; using with other versions may cause unexpected behavior or errors.","severity":"gotcha","affected_versions":">=0.0.1"}],"env_vars":null,"search_vec":"'across':93 'addit':20 'altern':29 'amphora':1,13,24,58,72,95 'base':8 'bus':3,10,38,53,61 'clay':52 'cms':14 'communic':45 'compat':22 'context':21 'cross':43 'cross-process':42 'default':32,60 'depend':84 'deploy':88 'distribut':92 'enrich':16 'environ':55 'event':2,9,91 'eventbus':74 'focus':80 'host':54 'in-memori':33 'instanc':96 'javascript':97 'memori':35 'messag':18 'minim':83 'modul':11,67 'multipl':94 'must':68 'namespac':65 'option':75 'packag':81 'pass':70 'persist':40 'process':44 'product':87 'provid':39 'publish':17 'redi':4,7,47 'redis-bas':6 'reliabl':90 'requir':89 'respect':63 'simpl':37 'small':79 'suit':85 'topic':64 'use':49 'v7.1.0':25 'variabl':56 'via':46","created_at":"2026-06-07T12:49:13.164398+00:00","updated_at":"2026-06-07T12:49:13.164398+00:00","problems":[{"fix":"Start Redis server or set CLAY_BUS_HOST to a valid Redis URL.","cause":"Redis server is not running or CLAY_BUS_HOST is not set correctly.","error":"Error: Redis connection error: connect ECONNREFUSED 127.0.0.1:6379"},{"fix":"Assign require('amphora-event-bus-redis') directly, without wrapping.","cause":"The eventBus option expects a function, not an object. Using require correctly returns the function.","error":"TypeError: eventBus is not a function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":null,"github":null,"docs":null,"changelog":null,"pypi":null,"npm":"amphora-event-bus-redis","openapi_spec":null,"status_page":null,"smithery":null,"categories":["messaging"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}