Skip to content

Fix rapid subscribe aggregate #461

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

parfeon
Copy link
Contributor

@parfeon parfeon commented Jul 4, 2025

fix(shared-worker): fix rapid subscribe aggregate

Fix the issue because of which rapid subscription (from other PubNub clients in response to received subscribe response) throttling causes delayed channel list change.

feat(shared-worker): emit heartbeat processing status

Depending on client configuration, it will emit status for heartbeat, which has been started by the SharedWorker backup heartbeat timer mechanism.

feat(shared-worker): stop backup heartbeats on 403

Stop heartbeats until the auth key / access token is changed. On change, SharedWorker will send an immediate heartbeat request.

refactor(shared-worker): restart backup heartbeat on explicit heartbeat

Restart the timer of the backup heartbeat if an explicit heartbeat request has been received from the main PubNub client.

refactor(shared-worker): add output of requests processed by the SharedWorker

Modify the log payload for SharedWorker to make it possible to log sent / received requests information to the main browser window (not to the SharedWorker console).

Fix the issue because of which rapid subscription (from other PubNub clients in response to
received subscribe response) throttling causes delayed channel list change.

refactor(shared-worker): add output of requests processed by the `SharedWorker`

Modify the `log` payload for `SharedWorker` to make it possible to log sent / received requests
information to the main browser window (not to the SharedWorker console).
@parfeon parfeon self-assigned this Jul 4, 2025
@parfeon parfeon added status: in progress This issue is being worked on. priority: high This PR should be reviewed ASAP. type: fix This PR contains fixes to existing features. labels Jul 4, 2025
@pubnub-ops-terraform
Copy link

pubnub-ops-terraform commented Jul 4, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

license/snyk check is complete. No issues have been found. (View Details)

Depending on client configuration, it will emit `status` for heartbeat, which has been started by the `SharedWorker` backup heartbeat timer mechanism.

feat(shared-worker): stop `backup` heartbeats on 403

Stop heartbeats until the auth key / access token is changed. On change, `SharedWorker` will send an immediate heartbeat request.

refactor(shared-worker): restart `backup` heartbeat on explicit heartbeat

Restart the timer of the backup heartbeat if an explicit heartbeat request has been received from the main PubNub client.
*
* @default `true`
*/
announceFailedHeartbeats: boolean;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this will help to get more feedback on hb
👍🏻

@mohitpubnub
Copy link
Contributor

mohitpubnub commented Jul 5, 2025

Looks fine so far.
With tab close and subscription changes handling in subscribe and heartbeat requests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: high This PR should be reviewed ASAP. status: in progress This issue is being worked on. type: fix This PR contains fixes to existing features.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants