module documentation

External-side client for Workflow Streams.

Used by activities, starters, and any code with a workflow handle to publish messages and subscribe to topics on a workflow that hosts a WorkflowStream.

Each published value is turned into a Payload via the client's sync payload converter. The codec chain (e.g. encryption, compression) is not run per item — it runs once at the envelope level when Temporal's SDK encodes the __temporal_workflow_stream_publish signal args and the __temporal_workflow_stream_poll update result. Running the codec per item as well would double-encrypt / double-compress, because the envelope path covers the items again. The per-item Payload still carries the encoding metadata (encoding: json/plain, messageType, etc.) required by subscribe(result_type=T) on the consumer side.

Type Variable T Undocumented
Function _is_retryable_rpc_error Undocumented
Constant _MESSAGE_TOO_LARGE_ERROR_PREFIXES Undocumented
Constant _RETRYABLE_RPC_STATUS_CODES Undocumented

Undocumented

Value
TypeVar('T')
def _is_retryable_rpc_error(error: RPCError) -> bool: (source)

Undocumented

_MESSAGE_TOO_LARGE_ERROR_PREFIXES: tuple[str, ...] = (source)

Undocumented

Value
('grpc: received message larger than max',
 'grpc: message after decompression larger than max',
 'grpc: received message after decompression larger than max')
_RETRYABLE_RPC_STATUS_CODES: frozenset[RPCStatusCode] = (source)

Undocumented

Value
frozenset(set([RPCStatusCode.ABORTED,
               RPCStatusCode.CANCELLED,
               RPCStatusCode.DATA_LOSS,
               RPCStatusCode.INTERNAL,
               RPCStatusCode.OUT_OF_RANGE,
               RPCStatusCode.RESOURCE_EXHAUSTED,
               RPCStatusCode.UNAVAILABLE,
...