Replies: 2 comments 3 replies
-
Would you include more information about your use case? You are correct about how how unsubscribe() works, and I haven't adequately documented how multiple calls to subscribe() sets up additional workers in memory on a single instance, much less provided a way to reason about managing them independently in the api. This is an advanced usage pattern, and I only recently started using multiple subscriptions in my app on 2 high volume queues to reduce a specific concurrency race condition. |
Beta Was this translation helpful? Give feedback.
3 replies
-
This will be included in the 6.0.0 release |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Firstly, thanks for a great library. I've been skirting around the requirements for adding a job queue in my current project, and now that I've taken the plunge, I'm happy to have chosen pg-boss.
My question relates to the
subscribe
/unsubscribe
dichotomy. It appears that ifsubscribe
is called multiple times with the same queue name, a subsequent call tounsubscribe
will remove them all. I was expecting something similar to node's EventEmitter structure, where a subscription setup withon
can subsequently be removed withoff
, without affecting any other subscriptions.I'm aware that
subscribe
kinda means something different in the job queue world vs standard pub/sub but I figured it might be useful to be able to remove individual subscriptions.What do you think?
Beta Was this translation helpful? Give feedback.
All reactions