nats.rs
nats.rs copied to clipboard
Break apart request and response
Use case
In some cases, you may want to shoot off a bunch of requests and defer processing the responses til later.
Proposed change
Introduce a Response<T = Message> type, this type would either be a future or into_future.
let response = client.request(...).await?; // Waits for the completion of the send.
let message = response.await?; // Waits for the receiving channel to get a message
Who benefits from the change(s)?
Users wanting to not wait for responses immediately
Alternative Approaches
No response