Skip to content
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

Optimize publishing #59

Closed
wants to merge 4 commits into from
Closed

Optimize publishing #59

wants to merge 4 commits into from

Conversation

roekatz
Copy link
Contributor

@roekatz roekatz commented Jun 20, 2023

  1. Less reconnections to DB
  2. Better ordering safety by notifying all subscribers through broadcaster (when configured), otherwise local subscribers are notified immediately - regardless of ordering of messages on the underlying broadcaster channel (eg. Postgres NOTIFY which guarantees order).

To have better ordering safety of messages (local subscribers won't be notified much before remote ones)
# Unsubscribe from internal events
logger.debug("Unsubscribing from ALL TOPICS")
await self._event_broadcaster._unsubscribe_from_topics()
pass
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm not sure I understand why you dropped the _unsubscribe_from_topics ?

@@ -264,3 +264,6 @@ async def __read_notifications__(self):
)
except:
logger.exception("Failed handling incoming broadcast")
logger.info(
Copy link
Contributor

Choose a reason for hiding this comment

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

Seems more like a debug message than info

@roekatz roekatz closed this Sep 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants