class documentation

class WorkflowTopicHandle(Generic[T]): (source)

Constructor: WorkflowTopicHandle(stream, name, type)

View In Hierarchy

Workflow-side handle for publishing to a single topic.

Warning

This class is experimental and may change in future versions.

Constructed via WorkflowStream.topic. Has no subscribe — workflows do not consume their own stream.

Method __init__ Bind the handle to a stream, topic name, and type.
Method publish Append value to the workflow stream on this topic.
Property name The topic name this handle is bound to.
Property type The value type this handle is bound to.
Instance Variable _name Undocumented
Instance Variable _stream Undocumented
Instance Variable _type Undocumented
def __init__(self, stream: WorkflowStream, name: str, type: type[T]): (source)

Bind the handle to a stream, topic name, and type.

Prefer WorkflowStream.topic over calling this directly; the factory is what records the per-stream type binding and rejects conflicts.

def publish(self, value: T | Payload): (source)

Append value to the workflow stream on this topic.

Parameters
value:T | PayloadValue to publish. Goes through the workflow's sync payload converter. A pre-built temporalio.api.common.v1.Payload bypasses conversion, regardless of the handle's bound type.

The topic name this handle is bound to.

The value type this handle is bound to.

Undocumented

Undocumented

Undocumented