faust.transport.conductor

The conductor delegates messages from the consumer to the streams.

class faust.transport.conductor.ConductorCompiler[source]

Compile a function to handle the messages for a topic+partition.

build(conductor: faust.transport.conductor.Conductor, tp: faust.types.tuples.TP, channels: MutableSet[faust.transport.conductor._Topic]) → Callable[faust.types.tuples.Message, Awaitable][source]

Generate closure used to deliver messages.

Return type

Callable[[Message], Awaitable[+T_co]]

class faust.transport.conductor.Conductor(app: faust.types.app.AppT, **kwargs) → None[source]

Manages the channels that subscribe to topics.

  • Consumes messages from topic using a single consumer.

  • Forwards messages to all channels subscribing to a topic.

logger = <Logger faust.transport.conductor (WARNING)>
acks_enabled_for(topic: str) → bool[source]

Return True if acks are enabled for topic by name.

Return type

bool

clear() → None[source]

Clear all subscriptions.

Return type

None

add(topic: Any) → None[source]

Register topic to be subscribed.

Return type

None

discard(topic: Any) → None[source]

Unregister topic from conductor.

Return type

None

property label

Return label for use in logs. :rtype: str

property shortlabel

Return short label for use in logs. :rtype: str