class

Crabbit::PublishHandle

Inherits Reference < Object

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.

Instance methods

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.

Source
completed?

Returns whether the publish already has a final outcome.

Source
on_confirm

Schedules callback to run once with the final confirmation.

Callbacks run outside the connection reader fiber. Returns self.

Source
publishing_id

Returns the publishing ID assigned to the message.

Source