|
ORE Studio 0.0.4
|
RAII handle for a NATS subscription. More...
#include <subscription.hpp>

Public Member Functions | |
| subscription (subscription &&) noexcept | |
| subscription & | operator= (subscription &&) noexcept |
| subscription (const subscription &)=delete | |
| subscription & | operator= (const subscription &)=delete |
| std::string | subject () const |
| Returns the NATS subject this subscription is listening on. | |
| void | drain () |
| Drain the subscription. | |
| subscription (std::unique_ptr< impl > i) | |
RAII handle for a NATS subscription.
Automatically unsubscribes and frees cnats resources when destroyed. Move-only — subscriptions cannot be shared or copied.
A subscription must not outlive the client that created it.
| void drain | ( | ) |
Drain the subscription.
Stops new message delivery and waits for all in-flight messages to be processed before unsubscribing.