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 Add/Remove super stream feature #357

Merged
merged 5 commits into from
Feb 13, 2024
Merged

Conversation

Gsantomaggio
Copy link
Member

@Gsantomaggio Gsantomaggio commented Feb 11, 2024

Implement the super-stream creation/deletion.

There are two ways to create the super-stream:

  1. Based on partitions with:
const string SuperStream = "my-first-system-super-stream";
var spec = new PartitionsSuperStreamSpec(SuperStream, 2);
await system.CreateSuperStream(spec);
  1. Based on keys with:
const string SuperStream = "countries";
var system = await StreamSystem.Create(new StreamSystemConfig());
var conf = new BindingsSuperStreamSpec(SuperStream, new[] { "italy", "france", "spain", "germany", "uk" });
await system.CreateSuperStream(conf);

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

codecov bot commented Feb 11, 2024

Codecov Report

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

Comparison is base (335a0f3) 92.35% compared to head (6abf247) 92.10%.

Files Patch % Lines
RabbitMQ.Stream.Client/CreateSuperStream.cs 95.00% 3 Missing ⚠️
RabbitMQ.Stream.Client/DeleteSuperStream.cs 89.65% 3 Missing ⚠️
RabbitMQ.Stream.Client/StreamSpec.cs 95.23% 2 Missing and 1 partial ⚠️
RabbitMQ.Stream.Client/StreamSystem.cs 88.23% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #357      +/-   ##
==========================================
- Coverage   92.35%   92.10%   -0.26%     
==========================================
  Files         116      118       +2     
  Lines       11738    12021     +283     
  Branches      915      927      +12     
==========================================
+ Hits        10841    11072     +231     
- Misses        690      734      +44     
- Partials      207      215       +8     

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

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
* one for partions
* one for bindings
* add tests

Signed-off-by: Gabriele Santomaggio <G.santomaggio@gmail.com>
@Gsantomaggio Gsantomaggio marked this pull request as ready for review February 13, 2024 10:10
@Gsantomaggio Gsantomaggio merged commit ac23f56 into main Feb 13, 2024
2 checks passed
@Gsantomaggio Gsantomaggio deleted the add_super_stream_api branch February 13, 2024 10:18
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.

1 participant