We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey, i have some issue while making an infinite subscriber. Here is the code:
let addr = std::env::var("NATS_ADDR").unwrap_or_else(|_| "127.0.0.1:4222".into()); let nats_client = Client::new(vec![addr.parse().unwrap()]); nats_client.connect().await; let subject = "test".parse().unwrap() let (_, mut subscription) = nats_client.subscribe(&subject, 1024).await.unwrap(); loop { let message = subscription.next().await.unwrap(); let message = String::from_utf8(message.into_payload()).unwrap(); info!("Nats message received {}", message); }
It works but I can't exit the program :/ (no SIGINT catch ?) I think having an example of this use case should be useful.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey, i have some issue while making an infinite subscriber.
Here is the code:
It works but I can't exit the program :/ (no SIGINT catch ?)
I think having an example of this use case should be useful.
The text was updated successfully, but these errors were encountered: