class
Crabbit::PublishHandle
- Crabbit::PublishHandle
- Reference
- Object
Overview
Future-like handle for an asynchronous publish confirmation.
Use #await for fiber-blocking code or #on_confirm to receive the result
asynchronously. Registering a callback after completion still invokes it.
Defined in:
crabbit/producer.crInstance Method Summary
-
#await(timeout : Time::Span = @default_timeout) : Confirmation
Waits for and returns the final confirmation.
-
#completed? : Bool
Returns whether the publish already has a final outcome.
-
#on_confirm(&callback : Confirmation -> ) : self
Schedules callback to run once with the final confirmation.
-
#publishing_id : UInt64
Returns the publishing ID assigned to the message.
Instance Method Detail
def await(timeout : Time::Span = @default_timeout) : Confirmation
#
Waits for and returns the final confirmation.
Raises TimeoutError if the handle has not resolved within timeout.
This wait timeout does not cancel the underlying publish.
Schedules callback to run once with the final confirmation.
Callbacks run outside the connection reader fiber. Returns self.