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

examples/real-time-routeviews-kafka-openbmp.rs minor issues #195

Open
0x0ac opened this issue Dec 3, 2024 · 0 comments
Open

examples/real-time-routeviews-kafka-openbmp.rs minor issues #195

0x0ac opened this issue Dec 3, 2024 · 0 comments
Assignees

Comments

@0x0ac
Copy link

0x0ac commented Dec 3, 2024

So a couple of minor things here. Firstly, I am very new to rust so apologies if my assumptions are wrong. I took your code to compile and test, and I got thrown this error:

error[E0308]: mismatched types
   --> src/main.rs:44:30
    |
44  |         .with_offset_storage(Some(GroupOffsetStorage::Kafka))
    |          ------------------- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `GroupOffsetStorage`, found `Option<GroupOffsetStorage>`
    |          |
    |          arguments to this method are incorrect
    |
    = note: expected enum `GroupOffsetStorage`
               found enum `Option<GroupOffsetStorage>`
note: method defined here
   --> /Users/owen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/kafka-0.9.0/src/consumer/builder.rs:157:12
    |
157 |     pub fn with_offset_storage(mut self, storage: GroupOffsetStorage) -> Builder {
    |            ^^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0308`.
error: could not compile `rv-check` (bin "rv-check") due to 1 previous error

I decided to remove the Some() wrapper, as it looks like the .with_offset_storage is expecting a GroupOffsetStorage directly, or maybe I am misunderstanding. However when I remove it, the code compiles and appears to work well.

in the example given you also have the pattern: r#"routeviews.amsix..*.bmp_raw"#

which is catching output from the 2 collectors:

    "routeviews.amsix.ams.39120.bmp_raw",
    "routeviews.amsix.ams.213241.bmp_raw",
    "routeviews.amsix.31019.bmp_raw",
    "routeviews.amsix.6908.bmp_raw",
    "routeviews.amsix.267613.bmp_raw",
    "routeviews.amsix.ams.140443.bmp_raw",

routeviews has 2 collectors at amsix : route-views.amsix.routeviews.org and amsix.ams.routeviews.org and I am pretty sure this is just the kind of topic collision we wanted to avoid :-)

thanks so much for your work on this Mingwei!!

@digizeph digizeph self-assigned this Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants