Skip to content

Conversation

@Gsantomaggio
Copy link
Member

ref: #264

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

codecov bot commented Apr 18, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.05 🎉

Comparison is base (e42d8fe) 92.80% compared to head (6ddf69b) 92.86%.

❗ Current head 6ddf69b differs from pull request most recent head 10ebdec. Consider uploading reports for the commit 10ebdec to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #265      +/-   ##
==========================================
+ Coverage   92.80%   92.86%   +0.05%     
==========================================
  Files         102      102              
  Lines        8869     8895      +26     
  Branches      704      705       +1     
==========================================
+ Hits         8231     8260      +29     
  Misses        492      492              
+ Partials      146      143       -3     
Impacted Files Coverage Δ
RabbitMQ.Stream.Client/Consts.cs 66.66% <ø> (ø)
RabbitMQ.Stream.Client/IConsumer.cs 100.00% <100.00%> (ø)
RabbitMQ.Stream.Client/RawConsumer.cs 85.75% <100.00%> (+0.26%) ⬆️
RabbitMQ.Stream.Client/Reliable/Consumer.cs 100.00% <100.00%> (ø)
RabbitMQ.Stream.Client/Reliable/ConsumerFactory.cs 91.86% <100.00%> (+0.39%) ⬆️
Tests/RawConsumerSystemTests.cs 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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 in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@debarisi
Copy link

Hi @Gsantomaggio ,
Can you please add one more property - RequestCreditSize?
The number of Credits will not benefit from any speed due to network roundtrips for every new credit.

@Gsantomaggio
Copy link
Member Author

Gsantomaggio commented Apr 19, 2023

@debarisi Not sure this will help. Have you tried it?

The following diagram explains how the flow works. The new credit will be appended to the buffer chunk.

chunk_flow drawio

In terms of performances requesting more credits at a time can affect only if the Channel.CreateBounded is empty.

Can you trace Channel.CreateBounded status? to see if it is empty?

_chunksBuffer = Channel.CreateBounded<Chunk>(new BoundedChannelOptions(_initialCredits)

@debarisi
Copy link

@Gsantomaggio, you are right. My apologies.
Even in the documentation, it clearly says:
A credit represents a chunk of messages that the broker is allowed to send to the consumer.
In my tests, I asked for a credit on every message, which was why I had a bad performance.

Thanks for the clarification.

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio marked this pull request as ready for review May 18, 2023 09:24
@Gsantomaggio
Copy link
Member Author

Per discussion with @Zerpet we will expose this parameter.

@Zerpet Zerpet added this to the 1.4.0 milestone May 18, 2023
@Zerpet
Copy link
Member

Zerpet commented May 18, 2023

I guess we can ship a new minor for this, no need to wait for 2.0.0. What do you think?

@Gsantomaggio
Copy link
Member Author

I guess we can ship a new minor for this, no need to wait for 2.0.0. What do you think?

yes agree 100%!

@Gsantomaggio Gsantomaggio merged commit 0f5cd64 into main May 18, 2023
@Gsantomaggio Gsantomaggio deleted the initial_credits branch May 18, 2023 09:56
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.

5 participants