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

Concurrent publishing issues? #454

Open
alanshaw opened this issue Oct 22, 2024 · 1 comment
Open

Concurrent publishing issues? #454

alanshaw opened this issue Oct 22, 2024 · 1 comment

Comments

@alanshaw
Copy link

I don't see any locks in or around NotifyPut - what happens if this is called concurrently? Can I lose an advertisement or is there some clever mitigation that I'm missing?

@willscott
Copy link
Member

No clever mitigation - the library expects only 1 Put to be called at a time. If you're making multiple calls / publishing from multiple go-routines, you should use a channel to order / synchronize them.
Worth noting though that in this case you don't really want to be in a position where you're queuing up Notifys - or you'll pretty quickly see yourself getting rate limited.

you'll do much better to PublishLocal for something that's happening frequently, and then use a separate periodic announcement to get changes picked up.

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

No branches or pull requests

2 participants