You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The produce_topic function does nothing, it prints
"GOING FOR IT !!" and "EXECUTING THE PRODUCER" and then stays stuck for a long while more than 2-3 minutes and then panics like this:
async fn produce_topic(producer: FutureProducer, req_payload: String) -> String {
println!("EXECUTING THE PRODUCER");let data: FutureRecord<String, String> = FutureRecord::to("DEMO").payload(&req_payload);let ans = producer.send(data, Timeout::Never)
.await
.expect("Unable to send req payload to kafka queue !")
;
println!("RESPONSE:");"sent".to_string()
}
#[tokio::main]
async fn main() {
let producer = kafka_producer();
// tokio::join!(produce_topic(producer.clone(), String::from("THIS IS TEST MESSAGE SENT FROM THE PRODUCER.RS !!") ));
println!("GOING FOR IT !!");let res = produce_topic(
producer.clone(),
String::from("THIS IS TEST MESSAGE SENT FROM THE PRODUCER.RS !!")
).await;
// Program stuck here ...
println!("Message sent to broker !! {}", res);
}
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The produce_topic function does nothing, it prints
"GOING FOR IT !!" and "EXECUTING THE PRODUCER" and then stays stuck for a long while more than 2-3 minutes and then panics like this:
What am I doing wrong ?
Beta Was this translation helpful? Give feedback.
All reactions