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

Implement Deduplicating Producer #234

Merged
merged 7 commits into from
Feb 13, 2023
Merged

Implement Deduplicating Producer #234

merged 7 commits into from
Feb 13, 2023

Conversation

Gsantomaggio
Copy link
Member

Fixes #227

Implement the DeduplicationProducer make the ProducerConfig.Reference deprecated.
The Producer does not need the Reference to work. Reference is needed only for the Deduplication part.

The low-level Class is the RawProducer class; this class sets the correct parameters to enable the deduplication and to make it easy to use.

Signed-off-by: Gabriele Santomaggio G.santomaggio@gmail.com

Fixes #227

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@codecov
Copy link

codecov bot commented Feb 9, 2023

Codecov Report

Base: 92.84% // Head: 93.00% // Increases project coverage by +0.16% 🎉

Coverage data is based on head (dfb8985) compared to base (280322e).
Patch coverage: 97.04% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #234      +/-   ##
==========================================
+ Coverage   92.84%   93.00%   +0.16%     
==========================================
  Files          96       98       +2     
  Lines        8424     8562     +138     
  Branches      655      662       +7     
==========================================
+ Hits         7821     7963     +142     
+ Misses        469      465       -4     
  Partials      134      134              
Impacted Files Coverage Δ
RabbitMQ.Stream.Client/Reliable/Producer.cs 80.74% <75.00%> (+0.33%) ⬆️
RabbitMQ.Stream.Client/RawProducer.cs 89.90% <100.00%> (+0.28%) ⬆️
...MQ.Stream.Client/Reliable/DeduplicatingProducer.cs 100.00% <100.00%> (ø)
Tests/DeduplicationProducerTests.cs 100.00% <100.00%> (ø)
Tests/MultiThreadTests.cs 100.00% <100.00%> (ø)
Tests/ReliableTests.cs 99.24% <100.00%> (+<0.01%) ⬆️
Tests/Utils.cs 76.57% <100.00%> (+0.35%) ⬆️
RabbitMQ.Stream.Client/WireFormatting.cs 74.57% <0.00%> (+3.38%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@michaelklishin
Copy link
Member

Should this be DeduplicatingProducer, a producer that deduplicates messages vs. a producer of deduplication? :) Sorry.

Copy link
Contributor

@lukebakken lukebakken left a comment

Choose a reason for hiding this comment

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

#234 (comment)

Thanks!

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio changed the title Implement DeduplicationProducer Implement Deduplicating Producer Feb 12, 2023
Zerpet
Zerpet previously approved these changes Feb 13, 2023
Copy link
Contributor

@Zerpet Zerpet left a comment

Choose a reason for hiding this comment

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

Looking good. Left a few cosmetic suggestions, but up to you if you want to merge as-is.

RabbitMQ.Stream.Client/Reliable/DeduplicatingProducer.cs Outdated Show resolved Hide resolved
RabbitMQ.Stream.Client/Reliable/DeduplicatingProducer.cs Outdated Show resolved Hide resolved
RabbitMQ.Stream.Client/Reliable/Producer.cs Outdated Show resolved Hide resolved
RabbitMQ.Stream.Client/Reliable/Producer.cs Outdated Show resolved Hide resolved
RabbitMQ.Stream.Client/Reliable/Producer.cs Outdated Show resolved Hide resolved
Tests/DeduplicationProducerTests.cs Outdated Show resolved Hide resolved
Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio
Copy link
Member Author

Thanks @Zerpet fixed here 1780afd

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio merged commit 2223eaa into main Feb 13, 2023
@Gsantomaggio Gsantomaggio deleted the refactor_producer branch February 13, 2023 13:38
@lukebakken lukebakken added this to the 1.2 milestone Feb 13, 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.

Implement DeduplicationProducer Class
4 participants