@siglo/sqs 0.0.0-stage → 1.0.1

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2017 Jerico de guzman
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,167 @@
1
- # Temporary Holding Version
1
+ # @siglo/sqs Adapter Guide
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ `@siglo/sqs` provides an AWS SQS batch consumer adapter for executing `Siglo` workflows. It is optimized for AWS Lambda event source mappings and standalone long-polling worker processes, implementing AWS partial batch failure protocols (`ReportBatchItemFailures`), message deduplication, and tenant namespace extraction.
4
+
5
+ ---
6
+
7
+ ## 1. Overview & Architecture
8
+
9
+ When AWS Lambda is triggered by an SQS queue, it passes a batch of records (`SQSEvent`). If one message in the batch fails, returning an uncaught exception causes the entire batch to be retried by AWS, resulting in duplicate processing of previously successful messages.
10
+
11
+ Furthermore, when concurrent Lambda invocations receive duplicate messages while execution is already underway, `@siglo/sqs` queries the `IdempotencyStore`. If an in-progress claim is detected, the adapter marks the message as a batch item failure. This causes SQS to retry the message after the visibility timeout expires rather than executing duplicate concurrent workflows.
12
+
13
+ `@siglo/sqs` handles this using AWS SQS Partial Batch Responses:
14
+
15
+ ```mermaid
16
+ flowchart TD
17
+ SQS["AWS SQS"] -->|Batch of N records| Lambda["AWS Lambda Trigger"]
18
+ Lambda --> Handler["createSqsBatchHandler<br/>• Iterates event.Records<br/>• Checks IdempotencyStore<br/>• Parses JSON Record Body<br/>• Executes Siglo"]
19
+ Handler --> Split{Record Result}
20
+ Split -->|Success Message| SSuccess["• Complete Idemp Key<br/>• Increment Count"]
21
+ Split -->|In-Progress Claim| SInProg["• Yield to SQS Retry<br/>• Append to batchItemFailures"]
22
+ Split -->|Failed Message| SFail["• Fail Idemp Key<br/>• Append to batchItemFailures"]
23
+ SSuccess --> BatchRes["Return Batch Result<br/>{ batchItemFailures: [...] }"]
24
+ SInProg --> BatchRes
25
+ SFail --> BatchRes
26
+ BatchRes --> Final["SQS deletes succeeded records<br/>SQS retries failed and in-progress items"]
27
+ ```
28
+
29
+ ---
30
+
31
+ ## 2. Installation & Requirements
32
+
33
+ Install `@siglo/sqs`:
34
+
35
+ ```bash
36
+ npm install @siglo/core @siglo/sqs
37
+ npm install --save-dev @types/aws-lambda
38
+ ```
39
+
40
+ Peer dependency matrix:
41
+ - `Siglo`: `*` (v1.0.0+)
42
+ - `@aws-sdk/client-sqs`: `^3.0.0` (optional if running in AWS Lambda runtime)
43
+
44
+ ---
45
+
46
+ ## 3. API Reference
47
+
48
+ ### `createSqsBatchHandler(workflow, options)`
49
+
50
+ Creates an AWS Lambda-compliant batch processor function:
51
+
52
+ ```typescript
53
+ function createSqsBatchHandler<TInput = any, TOutput = any>(
54
+ workflow: Flow<TInput, TOutput>,
55
+ options?: SigloSqsOptions<TInput, TOutput>
56
+ ): (event: SigloSqsEvent) => Promise<SqsBatchResponse>;
57
+ ```
58
+
59
+ ### TypeScript Interfaces
60
+
61
+ ```typescript
62
+ export interface SigloSqsRecord {
63
+ messageId: string;
64
+ receiptHandle: string;
65
+ body: string;
66
+ attributes?: Record<string, string>;
67
+ messageAttributes?: Record<string, any>;
68
+ }
69
+
70
+ export interface SigloSqsEvent {
71
+ Records: SigloSqsRecord[];
72
+ }
73
+
74
+ export interface SqsBatchResponse {
75
+ batchItemFailures: Array<{ itemIdentifier: string }>;
76
+ processedCount: number;
77
+ }
78
+ ```
79
+
80
+ ---
81
+
82
+ ## 4. Configuration Options (`SigloSqsOptions`)
83
+
84
+ | Option | Type | Default | Description |
85
+ | :--- | :--- | :--- | :--- |
86
+ | `input` | `(record: SigloSqsRecord) => Promise<TInput> \| TInput` | `JSON.parse(record.body)` | Custom mapper transforming an SQS record into workflow parameters. |
87
+ | `output` | `(result: any, record: SigloSqsRecord) => Promise<TOutput> \| TOutput` | `result` | Custom post-processor for step result. |
88
+ | `idempotencyStore` | `IdempotencyStore` | `undefined` | Distributed store to deduplicate across re-deliveries. |
89
+ | `idempotencyTtlMs` | `number` | `undefined` | Time-to-live for idempotency lock in milliseconds. Passed through to store (Redis/Postgres default: 24h; InMemory has no default expiration unless specified). |
90
+ | `timeout` | `number` | `undefined` | SLA execution timeout per record in milliseconds. |
91
+ | `namespace` | `string \| ((record: SigloSqsRecord) => string \| undefined)` | `record.messageAttributes.namespace` | Namespace extractor for multi-tenant isolation. |
92
+
93
+ ---
94
+
95
+ ## 5. AWS Lambda Configuration: `ReportBatchItemFailures`
96
+
97
+ To enable partial batch responses in AWS Lambda:
98
+ 1. In the AWS Lambda Console, navigate to your SQS Trigger configuration.
99
+ 2. Under **Additional settings**, check the option: **Report batch item failures**.
100
+ 3. In AWS SAM / CloudFormation / Serverless Framework / CDK:
101
+ ```yaml
102
+ FunctionEventSource:
103
+ Type: SQS
104
+ Properties:
105
+ Queue: !GetAtt MyQueue.Arn
106
+ FunctionResponseTypes:
107
+ - ReportBatchItemFailures
108
+ ```
109
+
110
+ When this is enabled, returning `{ batchItemFailures: [{ itemIdentifier: 'msg-01' }] }` tells AWS SQS to delete all successful messages in the batch from the queue, while leaving only `msg-01` in the queue to be retried or routed to the Dead Letter Queue (DLQ).
111
+
112
+ ---
113
+
114
+ ## 6. Complete AWS Lambda Production Example
115
+
116
+ ```typescript
117
+ import { SQSEvent, SQSBatchResponse, Context } from 'aws-lambda';
118
+ import { Step, flow } from '@siglo/core';
119
+ import { createSqsBatchHandler } from '@siglo/sqs';
120
+ import { PostgresIdempotencyStore } from '@siglo/postgres';
121
+ import { Pool } from 'pg';
122
+
123
+ // 1. Initialize PostgreSQL Connection Pool outside handler
124
+ const pool = new Pool({
125
+ connectionString: process.env.DATABASE_URL,
126
+ max: 5,
127
+ });
128
+
129
+ const idempotencyStore = new PostgresIdempotencyStore({ client: pool });
130
+
131
+ // 2. Define Notification Workflow
132
+ interface NotificationPayload {
133
+ userId: string;
134
+ template: string;
135
+ destination: string;
136
+ }
137
+
138
+ const formatNotification = Step.create('formatNotification', async (param: NotificationPayload) => {
139
+ return { formattedBody: `Hello user ${param.userId}, template ${param.template}` };
140
+ });
141
+
142
+ const dispatchEmail = Step.create('dispatchEmail', async (param: any) => {
143
+ // Send email via AWS SES or external provider
144
+ return { dispatched: true, messageRef: `ses_${Date.now()}` };
145
+ });
146
+
147
+ const notificationFlow = flow(formatNotification, dispatchEmail);
148
+
149
+ // 3. Create SQS Batch Handler
150
+ const sqsHandler = createSqsBatchHandler(notificationFlow, {
151
+ idempotencyStore,
152
+ timeout: 10000, // 10-second deadline per message
153
+ namespace: (record) => record.messageAttributes?.tenantId?.stringValue,
154
+ });
155
+
156
+ // 4. Export AWS Lambda Handler
157
+ export const handler = async (event: SQSEvent, context: Context): Promise<SQSBatchResponse> => {
158
+ context.callbackWaitsForEmptyEventLoop = false;
159
+
160
+ const response = await sqsHandler(event);
161
+ console.log(`Processed ${response.processedCount} messages. Failures: ${response.batchItemFailures.length}`);
162
+
163
+ return {
164
+ batchItemFailures: response.batchItemFailures,
165
+ };
166
+ };
167
+ ```
@@ -0,0 +1,33 @@
1
+ import { Flow, IdempotencyStore } from '@siglo/core';
2
+ export interface SigloSqsRecord {
3
+ messageId: string;
4
+ receiptHandle: string;
5
+ body: string;
6
+ attributes?: Record<string, string>;
7
+ messageAttributes?: Record<string, any>;
8
+ }
9
+ export interface SigloSqsEvent {
10
+ Records: SigloSqsRecord[];
11
+ }
12
+ export interface SigloSqsOptions<TInput = any, TOutput = any> {
13
+ input?: (record: SigloSqsRecord) => Promise<TInput> | TInput;
14
+ output?: (result: any, record: SigloSqsRecord) => Promise<TOutput> | TOutput;
15
+ idempotencyStore?: IdempotencyStore;
16
+ idempotencyTtlMs?: number;
17
+ timeout?: number;
18
+ namespace?: string | ((record: SigloSqsRecord) => string | undefined);
19
+ }
20
+ export interface SqsBatchResponse {
21
+ batchItemFailures: Array<{
22
+ itemIdentifier: string;
23
+ }>;
24
+ processedCount: number;
25
+ }
26
+ /**
27
+ * Creates an AWS Lambda compatible SQS batch message handler for rivulet workflows.
28
+ */
29
+ export declare function createSqsBatchHandler<TInput = any, TOutput = any>(workflow: Flow<TInput, TOutput>, options?: SigloSqsOptions<TInput, TOutput>): (event: SigloSqsEvent) => Promise<SqsBatchResponse>;
30
+ export type RivuletSqsRecord = SigloSqsRecord;
31
+ export type RivuletSqsEvent = SigloSqsEvent;
32
+ export type RivuletSqsOptions<TInput = any, TOutput = any> = SigloSqsOptions<TInput, TOutput>;
33
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAoB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEvE,MAAM,WAAW,cAAc;IAC3B,SAAS,E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,CAAC;AAC9C,MAAM,MAAM,eAAe,GAAG,aAAa,CAAC;AAC5C,MAAM,MAAM,iBAAiB,CAAC,MAAM,GAAG,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,eAAe,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,82 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createSqsBatchHandler = createSqsBatchHandler;
4
+ function unwrapContext(obj) {
5
+ if (!obj || typeof obj !== 'object') {
6
+ return obj;
7
+ }
8
+ const clean = {};
9
+ for (const key of Object.keys(obj)) {
10
+ if (key.startsWith('$')) {
11
+ continue;
12
+ }
13
+ const val = typeof obj[key] === 'function' ? (obj[key].val !== undefined ? obj[key].val : (obj[key].length === 0 ? obj[key]() : obj[key])) : obj[key];
14
+ clean[key] = val;
15
+ }
16
+ return clean;
17
+ }
18
+ /**
19
+ * Creates an AWS Lambda compatible SQS batch message handler for rivulet workflows.
20
+ */
21
+ function createSqsBatchHandler(workflow, options = {}) {
22
+ return async (event) => {
23
+ const batchItemFailures = [];
24
+ let processedCount = 0;
25
+ for (const record of event.Records || []) {
26
+ const idempKey = `sqs:${record.messageId}`;
27
+ if (options.idempotencyStore) {
28
+ const status = await options.idempotencyStore.claim(idempKey, options.idempotencyTtlMs);
29
+ if (status === 'completed') {
30
+ processedCount++;
31
+ continue;
32
+ }
33
+ if (status === 'in-progress') {
34
+ batchItemFailures.push({ itemIdentifier: record.messageId });
35
+ continue;
36
+ }
37
+ }
38
+ try {
39
+ let parsedInput = {};
40
+ if (options.input) {
41
+ parsedInput = await options.input(record);
42
+ }
43
+ else if (record.body) {
44
+ try {
45
+ parsedInput = JSON.parse(record.body);
46
+ }
47
+ catch {
48
+ parsedInput = { body: record.body };
49
+ }
50
+ }
51
+ let namespace;
52
+ if (typeof options.namespace === 'function') {
53
+ namespace = options.namespace(record);
54
+ }
55
+ else if (options.namespace) {
56
+ namespace = options.namespace;
57
+ }
58
+ else if (record.messageAttributes?.namespace?.stringValue) {
59
+ namespace = record.messageAttributes.namespace.stringValue;
60
+ }
61
+ const execOptions = {
62
+ timeout: options.timeout,
63
+ namespace,
64
+ };
65
+ const rawResult = await workflow.run(parsedInput, execOptions);
66
+ const cleanResult = unwrapContext(rawResult);
67
+ if (options.idempotencyStore) {
68
+ await options.idempotencyStore.complete(idempKey, cleanResult);
69
+ }
70
+ processedCount++;
71
+ }
72
+ catch (err) {
73
+ if (options.idempotencyStore) {
74
+ await options.idempotencyStore.fail(idempKey, err);
75
+ }
76
+ batchItemFailures.push({ itemIdentifier: record.messageId });
77
+ }
78
+ }
79
+ return { batchItemFailures, processedCount };
80
+ };
81
+ }
82
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;AA8CA,sDAmEC;AA1FD,SAAS,aAAa,CAAC,GAAQ;IAC3B,IAAI,CAAC,GAAG,IAAI,OAAO,GAAG,KAAK,QAAQ,EAAE,CAAC;QAClC,OAAO,GAAG,CAAC;IACf,CAAC;IACD,MAAM,KAAK,GAAwB,EAAE,CAAC;IACtC,KAAK,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;QACjC,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC,EAAE,CAAC;YACtB,SAAS;QACb,CAAC;QACD,MAAM,GAAG,GAAG,OAAO,GAAG,CAAC,GAAG,CAAC,KAAK,UAAU,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,CAAC,G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YACjE,CAAC;QACL,CAAC;QAED,OAAO,EAAE,iBAAiB,EAAE,cAAc,EAAE,CAAC;IACjD,CAAC,CAAC;AACN,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,61 @@
1
1
  {
2
2
  "name": "@siglo/sqs",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
6
- }
3
+ "version": "1.0.1",
4
+ "description": "AWS SQS message batch processor and event consumer adapter for Siglo workflows",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.js",
11
+ "require": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ },
14
+ "./package.json": "./package.json"
15
+ },
16
+ "files": [
17
+ "dist",
18
+ "README.md",
19
+ "LICENSE"
20
+ ],
21
+ "publishConfig": {
22
+ "access": "public",
23
+ "registry": "https://registry.npmjs.org/"
24
+ },
25
+ "scripts": {
26
+ "build": "tsc -p tsconfig.json",
27
+ "prepublishOnly": "npm run build",
28
+ "test": "npm run build && mocha -r tsx 'src/**/*.test.ts'"
29
+ },
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "git+https://github.com/jsoftgem/siglo.git",
33
+ "directory": "packages/sqs"
34
+ },
35
+ "author": "Jerico de Guzman",
36
+ "license": "MIT",
37
+ "bugs": {
38
+ "url": "https://github.com/jsoftgem/siglo/issues"
39
+ },
40
+ "homepage": "https://github.com/jsoftgem/siglo#readme",
41
+ "dependencies": {
42
+ "@siglo/core": "^1.0.0"
43
+ },
44
+ "peerDependencies": {
45
+ "@aws-sdk/client-sqs": "^3.0.0"
46
+ },
47
+ "peerDependenciesMeta": {
48
+ "@aws-sdk/client-sqs": {
49
+ "optional": true
50
+ }
51
+ },
52
+ "devDependencies": {
53
+ "@types/chai": "^5.2.3",
54
+ "@types/mocha": "^10.0.10",
55
+ "@types/node": "^26.6.5",
56
+ "chai": "^3.5.0",
57
+ "mocha": "^12.0.3",
58
+ "tsx": "^4.23.15",
59
+ "typescript": "~5.7.0"
60
+ }
61
+ }