@astralibx/email-rule-engine 12.2.0 → 12.3.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.
Files changed (2) hide show
  1. package/README.md +20 -0
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -113,6 +113,26 @@ See [docs/configuration.md](https://github.com/Hariprakash1997/astralib/blob/mai
113
113
 
114
114
  Reference: [API Routes](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-rule-engine/docs/api-routes.md) | [Programmatic API](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-rule-engine/docs/programmatic-api.md) | [Types](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-rule-engine/docs/types.md) | [Constants](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-rule-engine/docs/constants.md) | [Error Handling](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-rule-engine/docs/error-handling.md)
115
115
 
116
+ ### Redis Key Prefix (Required for Multi-Project Deployments)
117
+
118
+ > **WARNING:** If multiple projects share the same Redis server, you MUST set a unique `keyPrefix` per project. Without this, run locks, cancel flags, and progress keys will collide between projects.
119
+
120
+ ```typescript
121
+ const engine = createEmailRuleEngine({
122
+ redis: {
123
+ connection: redis,
124
+ keyPrefix: 'myproject:', // REQUIRED if sharing Redis
125
+ },
126
+ // ...
127
+ });
128
+ ```
129
+
130
+ | Default | Risk |
131
+ |---------|------|
132
+ | `''` (empty) | Two projects share global keys like `email-rule-runner:lock` and `run:{id}:cancel` — Project A can cancel Project B's runs |
133
+
134
+ **Always set a unique prefix** like `projectname:` when sharing Redis.
135
+
116
136
  > **Important:** Configure throttle settings before running rules. Default limits (1/day, 2/week) may be too restrictive. See [Throttling](https://github.com/Hariprakash1997/astralib/blob/main/packages/email-rule-engine/docs/throttling.md).
117
137
 
118
138
  ## License
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astralibx/email-rule-engine",
3
- "version": "12.2.0",
3
+ "version": "12.3.0",
4
4
  "description": "Rule-based email automation engine with MJML + Handlebars templates, throttling, and distributed locking",
5
5
  "repository": {
6
6
  "type": "git",