Skip to main content

Crate qubit_event_bus

Crate qubit_event_bus 

Source
Expand description

§Qubit Event Bus

A lightweight, thread-safe in-process event bus for Rust.

Structs§

Acknowledgement
Handle used by subscriber code to acknowledge an event.
AttemptTimeoutOption
Per-attempt timeout settings.
BatchPublishFailure
Failure captured while best-effort batch publishing continues.
BatchPublishResult
Result summary returned by best-effort batch publishing.
DeadLetterRecord
Standard dead-letter record with diagnostic metadata and original payload.
EventEnvelope
Standard message structure flowing through the event bus.
EventEnvelopeBuilder
Builder used to create EventEnvelope values with optional metadata.
EventEnvelopeMetadata
Type-erased event metadata exposed to global interceptors.
LocalEventBus
Thread-safe in-process event bus.
LocalEventBusFactory
Factory used to create LocalEventBus instances with default options.
PublishOptions
Immutable options applied when publishing events.
PublishOptionsBuilder
Builder used to create PublishOptions.
RetryOptions
Immutable retry option snapshot used by crate::Retry.
StagedEventEnvelope
Typed event and publish options staged inside a transaction.
SubscribeOptions
Immutable options applied to subscriber processing.
SubscribeOptionsBuilder
Builder used to create SubscribeOptions.
SubscriberInterceptorAnyChain
Chain handle passed to global subscriber interceptors.
SubscriberInterceptorChain
Chain handle passed to subscriber interceptors.
Subscription
Handle returned from a successful subscription.
Topic
Type-safe event topic.
TopicKey
Hashable key used internally to separate topics by name and payload type.
UnsupportedTransactionalEventBus
Placeholder transactional bus used by factories without transaction support.
UnsupportedTransactionalPublisher
Placeholder transactional publisher used by unsupported transactional buses.

Enums§

AckMode
Controls how subscriber handlers acknowledge event processing.
AttemptTimeoutPolicy
Action taken when one attempt exceeds its configured per-attempt timeout.
EventBusError
Error returned by event bus configuration, publishing, or subscription work.
RetryDelay
Base delay strategy before jitter is applied.
RetryJitter
Jitter strategy applied after a base crate::RetryDelay has been calculated.

Traits§

DeadLetterStrategy
Creates dead-letter envelopes for failed subscriber deliveries.
DeadLetterStrategyAny
Creates dead-letter envelopes without knowing the original payload type.
DeadLetterStrategyAnyCallback
Closure contract accepted by global dead-letter strategy builders.
DeadLetterStrategyCallback
Closure contract accepted by dead-letter strategy builders.
EventBus
Common event bus contract implemented by concrete backends.
EventBusFactory
Factory contract for creating event bus instances.
IntoEventBusResult
Converts closure return values into EventBusResult<()>.
IntoPublisherInterceptorAnyResult
Converts global publisher interceptor return values into the standard form.
IntoPublisherInterceptorResult
Converts publisher interceptor return values into the standard result form.
PublisherInterceptor
Intercepts events before they are published by a local event bus.
PublisherInterceptorAny
Intercepts outgoing event metadata before typed publisher interceptors run.
StagedEvent
Type-erased event staged inside a transaction.
SubscriberInterceptor
Intercepts subscriber processing with around-style control.
SubscriberInterceptorAny
Intercepts subscriber processing for every payload type.
TransactionalEventBus
Event bus extension for transactional publishing backends.
TransactionalPublisher
Publisher that buffers events until a transaction is committed.

Functions§

discard_dead_letters
Creates a strategy that discards failed events.
prefixed_dead_letters
Creates a strategy that routes standard dead letters to prefixed topics.
standard_dead_letters_to
Creates a strategy that routes standard dead-letter payloads to a topic.

Type Aliases§

DeadLetterOriginalPayload
Type-erased original payload stored inside dead-letter records.
DeadLetterPayload
Standard payload used by dead-letter envelopes.
EventBusResult
Result type used by event bus operations.