transport¶
- class mersal.transport.DefaultTransactionContext[source]¶
Bases:
TransactionContext
- class mersal.transport.DefaultTransactionContextWithOwningApp[source]¶
Bases:
DefaultTransactionContext
- class mersal.transport.OutgoingMessage[source]¶
Bases:
objectA convenience class wrapping a transport message and its destination.
- transport_message: TransportMessage¶
Message to be sent to the transport.
- class mersal.transport.Transport[source]¶
Bases:
Protocol- __init__(*args, **kwargs)¶
- async receive(transaction_context: TransactionContext) TransportMessage | None[source]¶
Return the next incoming message, or None if none is available.
Implementations may wait internally for a message but must return (a message or None) within a bounded time rather than blocking indefinitely: the worker treats each return as a liveness signal, and idle waiting is the job of the worker’s backoff strategy, not the transport.
- class mersal.transport.TransportBridge[source]¶
Bases:
TransportA Transport wrapper that allows sending messages to via other transports.
- __init__(default_transport: Transport, address_transport_mapping: dict[str, Transport]) None[source]¶
Initializes TransportBridge.
A Transport wrapper that allows sending messages to via other transports.
- async receive(transaction_context: TransactionContext) TransportMessage | None[source]¶
Return the next incoming message, or None if none is available.
Implementations may wait internally for a message but must return (a message or None) within a bounded time rather than blocking indefinitely: the worker treats each return as a liveness signal, and idle waiting is the job of the worker’s backoff strategy, not the transport.