You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -286,6 +286,7 @@ const consumer = new MySnsSqsConsumer(dependencies, {
286
286
|`pollingIntervalMs`|`number`|`5000`| Interval between availability checks (ms) |
287
287
|`timeoutMs`|`number \| NO_TIMEOUT`| - (required) | Maximum wait time before throwing `StartupResourcePollingTimeoutError`. Use `NO_TIMEOUT` to poll indefinitely |
288
288
|`throwOnTimeout`|`boolean`|`true`| When `true`, throws error on timeout. When `false`, reports error via errorReporter, resets timeout counter, and continues polling |
289
+
|`nonBlocking`|`boolean`|`false`| When `true`, `init()` returns immediately if resource is not available, and polling continues in the background. A callback is invoked when the resource becomes available |
289
290
290
291
### Environment-Specific Configuration
291
292
@@ -338,6 +339,19 @@ import { NO_TIMEOUT } from '@message-queue-toolkit/core'
338
339
}
339
340
}
340
341
}
342
+
343
+
// Non-blocking mode - service starts immediately, polling continues in background
344
+
// Useful when you want the service to be available even if dependencies are not ready
0 commit comments