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

Idempotency key for broker publish #336

Merged
merged 16 commits into from
Dec 25, 2023
Merged

Idempotency key for broker publish #336

merged 16 commits into from
Dec 25, 2023

Conversation

FZambia
Copy link
Member

@FZambia FZambia commented Nov 19, 2023

This should allow dropping duplicate publications on Centrifuge/Centrifugo level based on user-provided idempotency key

node.Publish("channel", []byte(`{}`), WithIdempotencyKey("my-key"))

Idempotency keys work per channel, default idempotency key cache time window is 5 minutes

Copy link

codecov bot commented Nov 19, 2023

Codecov Report

Attention: 45 lines in your changes are missing coverage. Please review.

Comparison is base (ef7d6b2) 83.87% compared to head (26417c0) 83.71%.

Files Patch % Lines
broker_redis.go 59.78% 29 Missing and 8 partials ⚠️
broker_memory.go 87.69% 6 Missing and 2 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #336      +/-   ##
==========================================
- Coverage   83.87%   83.71%   -0.16%     
==========================================
  Files          38       38              
  Lines        7472     7603     +131     
==========================================
+ Hits         6267     6365      +98     
- Misses        893      917      +24     
- Partials      312      321       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FZambia FZambia marked this pull request as ready for review November 20, 2023 19:19
@FZambia FZambia merged commit f94d006 into master Dec 25, 2023
10 checks passed
@FZambia FZambia deleted the idempotency_key branch December 25, 2023 10:27
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.

None yet

1 participant