@absolutejs/sync-bus-redis 0.0.2 → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.ts CHANGED
@@ -113,5 +113,13 @@ export type RedisClusterBusMetrics = {
113
113
  export type RedisClusterBus = ClusterBus & {
114
114
  metrics: () => RedisClusterBusMetrics;
115
115
  };
116
+ /** Payload-agnostic fan-out using the same Redis pub/sub transport. Messages
117
+ * are at-most-once; durable commands and effects belong in `@absolutejs/queue`. */
118
+ export type RedisChannelBus<Message> = {
119
+ metrics: () => RedisClusterBusMetrics;
120
+ publish: (message: Message) => Promise<void>;
121
+ subscribe: (onMessage: (message: Message) => void) => Promise<() => Promise<void>>;
122
+ };
123
+ export declare const createRedisChannelBus: <Message>(options: CreateRedisClusterBusOptions) => RedisChannelBus<Message>;
116
124
  export declare const createRedisClusterBus: (options: CreateRedisClusterBusOptions) => RedisClusterBus;
117
125
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAkB,MAAM,yBAAyB,CAAC;AAE1E;;;;;GAKG;AACH,MAAM,MAAM,cAAc,GAAG;IAC5B,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,KAAK,OAAO,CAAC,MAAM,GAAG,OAAO,CAAC,CAAC;CACzE,CAAC;AAEF;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,eAAe,GAAG;IAC7B,SAAS,EAAE,CACV,OAAO,EAAE,MAAM,EACf,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,KAC/B,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAClC,CAAC;AAEF,M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CAClC,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG;IAC1C,mDAAmD;IACnD,SAAS,EAAE,cAAc,CAAC;IAC1B;;+CAE2C;IAC3C,UAAU,EAAE,eAAe,CAAC;IAC5B;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;CACnC,CAAC;AAEF;;;;GAIG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACpC,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,CAAC;IACxB;;;;;OAKG;IACH,uBAAuB,EAAE,MAAM,CAAC;CAChC,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,UAAU,GAAG;IAC1C,OAAO,EAAE,MAAM,sBAAsB,CAAC;CACtC,CAAC;AAEF;mFACmF;AACnF,MAAM,MAAM,eAAe,CAAC,OAAO,IAAI;IACtC,OAAO,EAAE,MAAM,sBAAsB,CAAC;IACtC,OAAO,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,SAAS,EAAE,CACV,SAAS,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,KACjC,OAAO,CAAC,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;CAClC,CAAC;AAqDF,eAAO,MAAM,qBAAqB,GAAI,OAAO,EAC5C,SAAS,4BAA4B,KACnC,eAAe,CAAC,OAAO,CAAqC,CAAC;AAEhE,eAAO,MAAM,qBAAqB,GACjC,SAAS,4BAA4B,KACnC,eAA0D,CAAC"}
package/dist/index.js CHANGED
@@ -15,7 +15,7 @@ var __export = (target, all) => {
15
15
  };
16
16
 
17
17
  // src/index.ts
18
- var createRedisClusterBus = (options) => {
18
+ var createRedisBus = (options) => {
19
19
  const channel = options.channel ?? "absolutejs_sync_cluster";
20
20
  const onError = options.onError ?? ((error) => console.warn("[sync-bus-redis]", error));
21
21
  const counters = {
@@ -55,9 +55,12 @@ var createRedisClusterBus = (options) => {
55
55
  }
56
56
  };
57
57
  };
58
+ var createRedisChannelBus = (options) => createRedisBus(options);
59
+ var createRedisClusterBus = (options) => createRedisBus(options);
58
60
  export {
59
- createRedisClusterBus
61
+ createRedisClusterBus,
62
+ createRedisChannelBus
60
63
  };
61
64
 
62
- //# debugId=4645E21AE8A8C0AC64756E2164756E21
65
+ //# debugId=6257BF285653C54464756E2164756E21
63
66
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -2,9 +2,9 @@
2
2
  "version": 3,
3
3
  "sources": ["../src/index.ts"],
4
4
  "sourcesContent": [
5
- "/**\n * @absolutejs/sync-bus-redis — Redis pub/sub `ClusterBus` for\n * `@absolutejs/sync`. Cross-instance fan-out via PUBLISH/SUBSCRIBE.\n *\n * **Why Redis (vs the `sync-bus-pg` sibling).**\n *\n * - **No payload cap.** Postgres `NOTIFY` is capped at 8000 bytes,\n * forcing `sync-bus-pg` into a spill-table dance for large batches.\n * Redis PUBLISH has no equivalent limit — JSON straight through.\n * - **Lower latency at fan-out.** Redis pub/sub is in-memory; PG\n * `LISTEN/NOTIFY` rides the WAL replication path. For multi-shard\n * fan-out (10+ subscribers), Redis is typically faster.\n * - **Better geo-replication story.** Redis Cluster / Redis\n * Enterprise / managed Redis (ElastiCache, Memorystore, Upstash)\n * all geo-replicate natively. Postgres logical replication is\n * possible but heavier ops.\n *\n * **Why NOT Redis (when to use `sync-bus-pg` instead).**\n *\n * - **At-most-once delivery.** Redis pub/sub does NOT durably store\n * messages. A subscriber that's disconnected when a message fires\n * misses it. If you need a durable cluster bus for replay across\n * shard reboot, use `sync-bus-pg` (which has the spill table) and\n * pair with `engine.exportChangeLog()` / `importChangeLog()` for\n * post-reboot resume.\n * - **Already have Postgres in your stack.** Adding Redis just for\n * the cluster bus is a new dependency to operate.\n *\n * **Client compatibility.**\n *\n * The adapter takes a narrow interface (`publisher.publish(channel,\n * message)` and `subscriber.subscribe(channel, listener)`) so it works\n * with any 2026-era Redis client:\n *\n * - `ioredis`: `const redis = new Redis(url); const sub = redis.duplicate();`\n * - `node-redis` v4+: `const client = createClient({ url }); const sub = client.duplicate();`\n *\n * Each pub/sub-using consumer needs TWO connections — one for\n * publishing (your existing client), one for subscribing (a duplicate\n * dedicated to the subscription, because Redis prohibits other\n * commands on a subscribed connection). Pass both to\n * `createRedisClusterBus({ publisher, subscriber })`.\n *\n * See `README.md` for `ioredis` and `node-redis` adapter snippets.\n */\n\nimport type { ClusterBus, ClusterMessage } from '@absolutejs/sync/engine';\n\n/**\n * Minimal Redis publisher contract. Both `ioredis` and `node-redis` v4\n * structurally satisfy this (`publish(channel, message)` is the\n * canonical signature; both return a Promise that resolves to the\n * number of subscribers that received the message).\n */\nexport type RedisPublisher = {\n\tpublish: (channel: string, message: string) => Promise<number | unknown>;\n};\n\n/**\n * Minimal Redis subscriber contract. The shape diverges between\n * ioredis (EventEmitter-based) and node-redis (callback-based);\n * `RedisSubscriber` is the lowest-common-denominator:\n *\n * - `subscribe(channel, listener)` registers `listener` for messages\n * on `channel` AND returns an unsubscribe function. The listener\n * receives the raw message string.\n *\n * The README shows how to wrap ioredis (where you'd call\n * `subscriber.on('message', handler)` once and route by channel) and\n * node-redis (where `subscribe(channel, listener)` is the SDK call\n * directly).\n */\nexport type RedisSubscriber = {\n\tsubscribe: (\n\t\tchannel: string,\n\t\tlistener: (message: string) => void\n\t) => Promise<() => Promise<void>>;\n};\n\nexport type CreateRedisClusterBusOptions = {\n\t/** The Redis client used for `publish()` calls. */\n\tpublisher: RedisPublisher;\n\t/** The Redis subscriber. MUST be a dedicated connection (a\n\t * `duplicate()` of your main client) — Redis forbids other\n\t * commands on a subscribed connection. */\n\tsubscriber: RedisSubscriber;\n\t/**\n\t * Channel name. Defaults to `'absolutejs_sync_cluster'`. Two\n\t * engines on the same Redis can scope themselves to different\n\t * channels by overriding this.\n\t */\n\tchannel?: string;\n\t/**\n\t * Called when message parsing / delivery fails. Defaults to\n\t * `console.warn`. Note that Redis pub/sub doesn't surface delivery\n\t * failures on the publisher side — `publish()` resolves to the\n\t * count of subscribers that received the message (or 0); a 0 count\n\t * does NOT fire onError (Redis treats \"no subscribers\" as success).\n\t */\n\tonError?: (error: unknown) => void;\n};\n\n/**\n * Cumulative metrics since `createRedisClusterBus()`. Same shape\n * style as `sync-bus-pg`'s — minus the spill-table fields (Redis\n * has no equivalent).\n */\nexport type RedisClusterBusMetrics = {\n\tpublished: number;\n\treceived: number;\n\tpublishErrors: number;\n\tsubscribeErrors: number;\n\t/**\n\t * Cumulative count of subscribers reached on the publisher side.\n\t * Returned by Redis's PUBLISH. Use it as a rough \"is the cluster\n\t * still wired up\" signal — a drop to 0 when you expect peers means\n\t * subscribers disconnected (replication lag, network partition).\n\t */\n\ttotalSubscribersReached: number;\n};\n\nexport type RedisClusterBus = ClusterBus & {\n\tmetrics: () => RedisClusterBusMetrics;\n};\n\nexport const createRedisClusterBus = (\n\toptions: CreateRedisClusterBusOptions\n): RedisClusterBus => {\n\tconst channel = options.channel ?? 'absolutejs_sync_cluster';\n\tconst onError =\n\t\toptions.onError ?? ((error) => console.warn('[sync-bus-redis]', error));\n\n\tconst counters: RedisClusterBusMetrics = {\n\t\tpublishErrors: 0,\n\t\tpublished: 0,\n\t\treceived: 0,\n\t\tsubscribeErrors: 0,\n\t\ttotalSubscribersReached: 0\n\t};\n\n\treturn {\n\t\tmetrics: () => ({ ...counters }),\n\t\tpublish: async (message: ClusterMessage): Promise<void> => {\n\t\t\ttry {\n\t\t\t\tconst serialized = JSON.stringify(message);\n\t\t\t\tconst result = await options.publisher.publish(\n\t\t\t\t\tchannel,\n\t\t\t\t\tserialized\n\t\t\t\t);\n\t\t\t\tif (typeof result === 'number') {\n\t\t\t\t\tcounters.totalSubscribersReached += result;\n\t\t\t\t}\n\t\t\t\tcounters.published += 1;\n\t\t\t} catch (error) {\n\t\t\t\tcounters.publishErrors += 1;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tsubscribe: async (\n\t\t\tonMessage: (message: ClusterMessage) => void\n\t\t): Promise<() => Promise<void>> => {\n\t\t\tconst listener = (raw: string): void => {\n\t\t\t\ttry {\n\t\t\t\t\tconst parsed = JSON.parse(raw) as ClusterMessage;\n\t\t\t\t\tcounters.received += 1;\n\t\t\t\t\tonMessage(parsed);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tcounters.subscribeErrors += 1;\n\t\t\t\t\tonError(error);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn options.subscriber.subscribe(channel, listener);\n\t\t}\n\t};\n};\n"
5
+ "/**\n * @absolutejs/sync-bus-redis — Redis pub/sub `ClusterBus` for\n * `@absolutejs/sync`. Cross-instance fan-out via PUBLISH/SUBSCRIBE.\n *\n * **Why Redis (vs the `sync-bus-pg` sibling).**\n *\n * - **No payload cap.** Postgres `NOTIFY` is capped at 8000 bytes,\n * forcing `sync-bus-pg` into a spill-table dance for large batches.\n * Redis PUBLISH has no equivalent limit — JSON straight through.\n * - **Lower latency at fan-out.** Redis pub/sub is in-memory; PG\n * `LISTEN/NOTIFY` rides the WAL replication path. For multi-shard\n * fan-out (10+ subscribers), Redis is typically faster.\n * - **Better geo-replication story.** Redis Cluster / Redis\n * Enterprise / managed Redis (ElastiCache, Memorystore, Upstash)\n * all geo-replicate natively. Postgres logical replication is\n * possible but heavier ops.\n *\n * **Why NOT Redis (when to use `sync-bus-pg` instead).**\n *\n * - **At-most-once delivery.** Redis pub/sub does NOT durably store\n * messages. A subscriber that's disconnected when a message fires\n * misses it. If you need a durable cluster bus for replay across\n * shard reboot, use `sync-bus-pg` (which has the spill table) and\n * pair with `engine.exportChangeLog()` / `importChangeLog()` for\n * post-reboot resume.\n * - **Already have Postgres in your stack.** Adding Redis just for\n * the cluster bus is a new dependency to operate.\n *\n * **Client compatibility.**\n *\n * The adapter takes a narrow interface (`publisher.publish(channel,\n * message)` and `subscriber.subscribe(channel, listener)`) so it works\n * with any 2026-era Redis client:\n *\n * - `ioredis`: `const redis = new Redis(url); const sub = redis.duplicate();`\n * - `node-redis` v4+: `const client = createClient({ url }); const sub = client.duplicate();`\n *\n * Each pub/sub-using consumer needs TWO connections — one for\n * publishing (your existing client), one for subscribing (a duplicate\n * dedicated to the subscription, because Redis prohibits other\n * commands on a subscribed connection). Pass both to\n * `createRedisClusterBus({ publisher, subscriber })`.\n *\n * See `README.md` for `ioredis` and `node-redis` adapter snippets.\n */\n\nimport type { ClusterBus, ClusterMessage } from '@absolutejs/sync/engine';\n\n/**\n * Minimal Redis publisher contract. Both `ioredis` and `node-redis` v4\n * structurally satisfy this (`publish(channel, message)` is the\n * canonical signature; both return a Promise that resolves to the\n * number of subscribers that received the message).\n */\nexport type RedisPublisher = {\n\tpublish: (channel: string, message: string) => Promise<number | unknown>;\n};\n\n/**\n * Minimal Redis subscriber contract. The shape diverges between\n * ioredis (EventEmitter-based) and node-redis (callback-based);\n * `RedisSubscriber` is the lowest-common-denominator:\n *\n * - `subscribe(channel, listener)` registers `listener` for messages\n * on `channel` AND returns an unsubscribe function. The listener\n * receives the raw message string.\n *\n * The README shows how to wrap ioredis (where you'd call\n * `subscriber.on('message', handler)` once and route by channel) and\n * node-redis (where `subscribe(channel, listener)` is the SDK call\n * directly).\n */\nexport type RedisSubscriber = {\n\tsubscribe: (\n\t\tchannel: string,\n\t\tlistener: (message: string) => void\n\t) => Promise<() => Promise<void>>;\n};\n\nexport type CreateRedisClusterBusOptions = {\n\t/** The Redis client used for `publish()` calls. */\n\tpublisher: RedisPublisher;\n\t/** The Redis subscriber. MUST be a dedicated connection (a\n\t * `duplicate()` of your main client) — Redis forbids other\n\t * commands on a subscribed connection. */\n\tsubscriber: RedisSubscriber;\n\t/**\n\t * Channel name. Defaults to `'absolutejs_sync_cluster'`. Two\n\t * engines on the same Redis can scope themselves to different\n\t * channels by overriding this.\n\t */\n\tchannel?: string;\n\t/**\n\t * Called when message parsing / delivery fails. Defaults to\n\t * `console.warn`. Note that Redis pub/sub doesn't surface delivery\n\t * failures on the publisher side — `publish()` resolves to the\n\t * count of subscribers that received the message (or 0); a 0 count\n\t * does NOT fire onError (Redis treats \"no subscribers\" as success).\n\t */\n\tonError?: (error: unknown) => void;\n};\n\n/**\n * Cumulative metrics since `createRedisClusterBus()`. Same shape\n * style as `sync-bus-pg`'s — minus the spill-table fields (Redis\n * has no equivalent).\n */\nexport type RedisClusterBusMetrics = {\n\tpublished: number;\n\treceived: number;\n\tpublishErrors: number;\n\tsubscribeErrors: number;\n\t/**\n\t * Cumulative count of subscribers reached on the publisher side.\n\t * Returned by Redis's PUBLISH. Use it as a rough \"is the cluster\n\t * still wired up\" signal — a drop to 0 when you expect peers means\n\t * subscribers disconnected (replication lag, network partition).\n\t */\n\ttotalSubscribersReached: number;\n};\n\nexport type RedisClusterBus = ClusterBus & {\n\tmetrics: () => RedisClusterBusMetrics;\n};\n\n/** Payload-agnostic fan-out using the same Redis pub/sub transport. Messages\n * are at-most-once; durable commands and effects belong in `@absolutejs/queue`. */\nexport type RedisChannelBus<Message> = {\n\tmetrics: () => RedisClusterBusMetrics;\n\tpublish: (message: Message) => Promise<void>;\n\tsubscribe: (\n\t\tonMessage: (message: Message) => void\n\t) => Promise<() => Promise<void>>;\n};\n\nconst createRedisBus = <Message>(\n\toptions: CreateRedisClusterBusOptions\n): RedisChannelBus<Message> => {\n\tconst channel = options.channel ?? 'absolutejs_sync_cluster';\n\tconst onError =\n\t\toptions.onError ?? ((error) => console.warn('[sync-bus-redis]', error));\n\n\tconst counters: RedisClusterBusMetrics = {\n\t\tpublishErrors: 0,\n\t\tpublished: 0,\n\t\treceived: 0,\n\t\tsubscribeErrors: 0,\n\t\ttotalSubscribersReached: 0\n\t};\n\n\treturn {\n\t\tmetrics: () => ({ ...counters }),\n\t\tpublish: async (message: Message): Promise<void> => {\n\t\t\ttry {\n\t\t\t\tconst serialized = JSON.stringify(message);\n\t\t\t\tconst result = await options.publisher.publish(\n\t\t\t\t\tchannel,\n\t\t\t\t\tserialized\n\t\t\t\t);\n\t\t\t\tif (typeof result === 'number') {\n\t\t\t\t\tcounters.totalSubscribersReached += result;\n\t\t\t\t}\n\t\t\t\tcounters.published += 1;\n\t\t\t} catch (error) {\n\t\t\t\tcounters.publishErrors += 1;\n\t\t\t\tthrow error;\n\t\t\t}\n\t\t},\n\t\tsubscribe: async (\n\t\t\tonMessage: (message: Message) => void\n\t\t): Promise<() => Promise<void>> => {\n\t\t\tconst listener = (raw: string): void => {\n\t\t\t\ttry {\n\t\t\t\t\tconst parsed = JSON.parse(raw) as Message;\n\t\t\t\t\tcounters.received += 1;\n\t\t\t\t\tonMessage(parsed);\n\t\t\t\t} catch (error) {\n\t\t\t\t\tcounters.subscribeErrors += 1;\n\t\t\t\t\tonError(error);\n\t\t\t\t}\n\t\t\t};\n\t\t\treturn options.subscriber.subscribe(channel, listener);\n\t\t}\n\t};\n};\n\nexport const createRedisChannelBus = <Message>(\n\toptions: CreateRedisClusterBusOptions\n): RedisChannelBus<Message> => createRedisBus<Message>(options);\n\nexport const createRedisClusterBus = (\n\toptions: CreateRedisClusterBusOptions\n): RedisClusterBus => createRedisBus<ClusterMessage>(options);\n"
6
6
  ],
7
- "mappings": ";;;;;;;;;;;;;;;;;AA6HO,IAAM,wBAAwB,CACpC,YACqB;AAAA,EACrB,MAAM,UAAU,QAAQ,WAAW;AAAA,EACnC,MAAM,UACL,QAAQ,YAAY,CAAC,UAAU,QAAQ,KAAK,oBAAoB,KAAK;AAAA,EAEtE,MAAM,WAAmC;AAAA,IACxC,eAAe;AAAA,IACf,WAAW;AAAA,IACX,UAAU;AAAA,IACV,iBAAiB;AAAA,IACjB,yBAAyB;AAAA,EAC1B;AAAA,EAEA,OAAO;AAAA,IACN,SAAS,OAAO,KAAK,SAAS;AAAA,IAC9B,SAAS,OAAO,YAA2C;AAAA,MAC1D,IAAI;AAAA,QACH,MAA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AAAA,QACA,SAAS,aAAa;AAAA,QACrB,OAAO,OAAO;AAAA,QACf,SAAS,iBAAiB;AAAA,QAC1B,MAAM;AAAA;AAAA;AAAA,IAGR,WAAW,OACV,cACkC;AAAA,MAClC,MAAM,WAAW,CAAC,QAAsB;AAAA,QACvC,IAAI;AAAA,UACH,MAAM,SAAS,KAAK,MAAM,GAAG;AAAA,UAC7B,SAAS,YAAY;AAAA,UACrB,UAAU,MAAM;AAAA,UACf,OAAO,OAAO;AAAA,UACf,SAAS,mBAAmB;AAAA,UAC5B,QAAQ,KAAK;AAAA;AAAA;AAAA,MAGf,OAAO,QAAQ,WAAW,UAAU,SAAS,QAAQ;AAAA;AAAA,EAEvD;AAAA;AAGM,IAAM,wBAAwB,CACpC,YAC8B,eAAwB,OAAO;AAEvD,IAAM,wBAAwB,CACpC,YACqB,eAA+B,OAAO;",
8
+ "debugId": "6257BF285653C54464756E2164756E21",
9
9
  "names": []
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAM5D,eAAO,MAAM,QAAQ,qFAmEnB,CAAC"}
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAM5D,eAAO,MAAM,QAAQ,qFAwFnB,CAAC"}
package/dist/manifest.js CHANGED
@@ -8534,6 +8534,27 @@ var manifest = defineManifest()({
8534
8534
  }
8535
8535
  ]
8536
8536
  }
8537
+ }),
8538
+ defineImplementation()({
8539
+ contract: "messaging/channel-bus",
8540
+ factory: "createRedisChannelBus",
8541
+ from: "@absolutejs/sync-bus-redis",
8542
+ requires: {
8543
+ services: [
8544
+ { description: "At-most-once typed fan-out", id: "redis" }
8545
+ ]
8546
+ },
8547
+ settings: Type2.Object({ channel: Type2.Optional(Type2.String()) }),
8548
+ title: "Typed Redis channel bus (optional, at-most-once)",
8549
+ wiring: {
8550
+ code: "createRedisChannelBus({ publisher: redisPublisher, subscriber: redisSubscriber, ...${settings} })",
8551
+ imports: [
8552
+ {
8553
+ from: "@absolutejs/sync-bus-redis",
8554
+ names: ["createRedisChannelBus"]
8555
+ }
8556
+ ]
8557
+ }
8537
8558
  })
8538
8559
  ],
8539
8560
  settings: Type2.Object({}),
@@ -8543,5 +8564,5 @@ export {
8543
8564
  manifest
8544
8565
  };
8545
8566
 
8546
- //# debugId=4985BDA3C799E5C264756E2164756E21
8567
+ //# debugId=4859048FDE8AED3B64756E2164756E21
8547
8568
  //# sourceMappingURL=manifest.js.map