Skip to content

Commit 8e58239

Browse files
authored
Merge pull request #12 from imqueue/execution-lock
feat: implemented execution locks - locks for single listener mode if…
2 parents 53d629c + 1ef7374 commit 8e58239

File tree

9 files changed

+1302
-151
lines changed

9 files changed

+1302
-151
lines changed

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,16 @@ const pubSub = new PgPubSub({ pgClient: existingClient });
246246
> connection approach. And this library as well. It is just more simple and
247247
> reliable.
248248
249+
Also, PgPubSub supports execution lock. This means all services become listeners
250+
in single listener mode but only one listener can process a notification. To
251+
enable this feature, you can bypass `executionLock` as option and set it to
252+
`true`. By default, this lock type is turned off.
253+
254+
> **NOTE:** Sometimes you might receive the notification with the same payloads
255+
> in a very short period of time but execution lock will process them as the
256+
> only notify message. If this important to you and your system will lave data
257+
> leaks you need to ensure that payloads are unique.
258+
249259
## [Full API Docs](https://github.com/imqueue/pg-pubsub/wiki)
250260

251261
You may read API docs on [wiki pages](https://github.com/imqueue/pg-pubsub/wiki)

0 commit comments

Comments
 (0)