rabbitmq / rabbitmq-stream-rust-client

A client library for RabbitMQ streams
Other
152 stars 14 forks source link

expose store_offset and query_offset in consumer #203

Closed DanielePalaia closed 10 months ago

DanielePalaia commented 11 months ago

This closes https://github.com/rabbitmq/rabbitmq-stream-rust-client/issues/195

Exposes store_offset and query_offset in Consumer struct

codecov[bot] commented 11 months ago

Codecov Report

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

Comparison is base (749db50) 88.17% compared to head (d331ac8) 88.56%. Report is 4 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #203 +/- ## ========================================== + Coverage 88.17% 88.56% +0.38% ========================================== Files 68 68 Lines 5625 5650 +25 ========================================== + Hits 4960 5004 +44 + Misses 665 646 -19 ``` | [Files](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-rust-client/pull/203?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq) | Coverage Δ | | |---|---|---| | [src/environment.rs](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-rust-client/pull/203?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq#diff-c3JjL2Vudmlyb25tZW50LnJz) | `78.80% <100.00%> (+0.14%)` | :arrow_up: | | [src/consumer.rs](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-rust-client/pull/203?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq#diff-c3JjL2NvbnN1bWVyLnJz) | `79.47% <95.65%> (+6.03%)` | :arrow_up: | | [src/error.rs](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-rust-client/pull/203?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq#diff-c3JjL2Vycm9yLnJz) | `5.88% <0.00%> (+5.88%)` | :arrow_up: | ... and [8 files with indirect coverage changes](https://app.codecov.io/gh/rabbitmq/rabbitmq-stream-rust-client/pull/203/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=rabbitmq)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

DanielePalaia commented 10 months ago

@Gsantomaggio Sure! Done!!

Gsantomaggio commented 10 months ago

Can you add a test using a real offset coming form the chunk ?

DanielePalaia commented 10 months ago

Done!

DanielePalaia commented 10 months ago

@Gsantomaggio and @wolf4ood for the review! I also implemented the last suggestion as having more compact code is better!