Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

feat: Consumer that does nothing except poll #57

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

Conversation

lynnagara
Copy link
Member

Does nothing except poll and commit offsets every 100k messages.
This consumer does not use any processing strategy or stream processor.
The goal of this is to benchmark it's performance against the noop consumer.

Does nothing except poll and commit offsets every 100k messages.
This consumer does not use any processing strategy or stream processor.
The goal of this is to benchmark it's performance against the noop consumer.
@nikhars
Copy link
Member

nikhars commented Jun 27, 2022

Do you want to merge this PR or just try it out for testing?

@lynnagara
Copy link
Member Author

lynnagara commented Jun 27, 2022

I wouldn't mind merging this and building some more iterations on top of it

Comment on lines +22 to +29
struct StrategyFactory {
batch_time: u64,
}
impl ProcessingStrategyFactory<KafkaPayload> for StrategyFactory {
fn create(&self) -> Box<dyn ProcessingStrategy<KafkaPayload>> {
Box::new(noop::new(Duration::from_millis(self.batch_time)))
}
}
Copy link
Member

Choose a reason for hiding this comment

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

This version does not require this code.

}

fn main() {
let matches = App::new("noop consumer")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
let matches = App::new("noop consumer")
let matches = App::new("consumer-only")

fn main() {
let matches = App::new("noop consumer")
.version(option_env!("CARGO_PKG_VERSION").unwrap_or(""))
.about("Simple noop consumer")
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.about("Simple noop consumer")
.about("Simple consumer with no arroyo")

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants