Skip to content

Add debounce-mechanism to messages#1630

Open
BeeJay28 wants to merge 2 commits intobinwiederhier:mainfrom
BeeJay28:1550-Add-debounce-to-messages
Open

Add debounce-mechanism to messages#1630
BeeJay28 wants to merge 2 commits intobinwiederhier:mainfrom
BeeJay28:1550-Add-debounce-to-messages

Conversation

@BeeJay28
Copy link

@BeeJay28 BeeJay28 commented Mar 1, 2026

Fixes #1550

Default-config-value: time.Duration(0), implying no debounce is used

BeeJay28 added 2 commits March 1, 2026 17:10
…ly tracks via message-based hash and timestamp if an identical message was recently sent
@binwiederhier
Copy link
Owner

Thank you for your PR. However, I'd rather do a web app debounce, where I don't play a sound when the last message is <1s ago.

Also, your map is never cleared, so it'll eventually OOM most likely

@BeeJay28
Copy link
Author

BeeJay28 commented Mar 1, 2026

Thank you for your PR. However, I'd rather do a web app debounce, where I don't play a sound when the last message is <1s ago.

Oh, so you mean on client-side in general just silently accept the message as subscriber and send no notification alert? Frankly, I am not too sure what the author of the original issue exactly needs but I guess that'll do too.

Also, your map is never cleared, so it'll eventually OOM most likely

Oops, that is a very good point. I could just check it on every request or hook it into some goroutine, kind of like you print a status-log on the server-instance every X seconds. All of that only if I would still be going for my original server-side way that is.

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.

Debounce messages

2 participants