-
Notifications
You must be signed in to change notification settings - Fork 0
[Kafka] Setup client with examples #18
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
Conversation
70ac057
to
2535cb9
Compare
kafka/src/example/run_consumer.rs
Outdated
.try_for_each(|borrowed_message| async move { | ||
match borrowed_message.payload_view::<str>() { | ||
Some(Ok(s)) => { | ||
println!("Recevied payload: {}", s); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
println!("Recevied payload: {}", s); | |
println!("Received payload: {}", s); |
kafka/src/kafka_client.rs
Outdated
bootstrap_server: &str, | ||
group_id: Option<&str>, | ||
batch_interval: Option<&str>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we document these parameters?
kafka/src/kafka_client.rs
Outdated
let producer: FutureProducer = FutureProducer::from_config(&self.client_config)?; | ||
Ok(producer) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let producer: FutureProducer = FutureProducer::from_config(&self.client_config)?; | |
Ok(producer) | |
FutureProducer::from_config(&self.client_config) |
will this work? same with create_consumer
|
||
pub async fn send_to_topic( | ||
&self, | ||
future_producer: &FutureProducer, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's worth defining our own wrapper around FutureProducer
, for a friendlier type (we control what is created/used based on KafkaClient
).
just a general thought
2535cb9
to
b599099
Compare
b599099
to
25cc20f
Compare
Towards https://linear.app/ollm/issue/OLL-20/kafka-spin-up