faust.types.channels

class faust.types.channels.ChannelT(app: _AppT, *, schema: Optional[_SchemaT] = None, key_type: Optional[_ModelArg] = None, value_type: Optional[_ModelArg] = None, is_iterator: bool = False, queue: Optional[ThrowableQueue] = None, maxsize: Optional[int] = None, root: Optional[ChannelT] = None, active_partitions: Optional[Set[TP]] = None, loop: Optional[AbstractEventLoop] = None)[source]
app: _AppT
schema: _SchemaT
key_type: Optional[_ModelArg]
value_type: Optional[_ModelArg]
loop: Optional[AbstractEventLoop]
maxsize: Optional[int]
active_partitions: Optional[Set[TP]]
abstract clone(*, is_iterator: Optional[bool] = None, **kwargs: Any) ChannelT[_T][source]
Return type:

ChannelT

abstract clone_using_queue(queue: Queue) ChannelT[_T][source]
Return type:

ChannelT

abstract stream(**kwargs: Any) _StreamT[_T][source]
abstract get_topic_name() str[source]
Return type:

str

abstract async send(*, key: Optional[Union[bytes, _ModelT, Any]] = None, value: Optional[Union[bytes, _ModelT, Any]] = None, partition: Optional[int] = None, timestamp: Optional[float] = None, headers: Optional[Union[List[Tuple[str, bytes]], Mapping[str, bytes]]] = None, schema: Optional[_SchemaT] = None, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, callback: Optional[Callable[[FutureMessage], Union[None, Awaitable[None]]]] = None, force: bool = False) Awaitable[RecordMetadata][source]
Return type:

_GenericAlias[RecordMetadata]

abstract send_soon(*, key: Optional[Union[bytes, _ModelT, Any]] = None, value: Optional[Union[bytes, _ModelT, Any]] = None, partition: Optional[int] = None, timestamp: Optional[float] = None, headers: Optional[Union[List[Tuple[str, bytes]], Mapping[str, bytes]]] = None, schema: Optional[_SchemaT] = None, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, callback: Optional[Callable[[FutureMessage], Union[None, Awaitable[None]]]] = None, force: bool = False, eager_partitioning: bool = False) FutureMessage[source]
Return type:

FutureMessage

abstract as_future_message(key: Optional[Union[bytes, _ModelT, Any]] = None, value: Optional[Union[bytes, _ModelT, Any]] = None, partition: Optional[int] = None, timestamp: Optional[float] = None, headers: Optional[Union[List[Tuple[str, bytes]], Mapping[str, bytes]]] = None, schema: Optional[_SchemaT] = None, key_serializer: Optional[Union[CodecT, str]] = None, value_serializer: Optional[Union[CodecT, str]] = None, callback: Optional[Callable[[FutureMessage], Union[None, Awaitable[None]]]] = None, eager_partitioning: bool = False) FutureMessage[source]
Return type:

FutureMessage

abstract async publish_message(fut: FutureMessage, wait: bool = True) Awaitable[RecordMetadata][source]
Return type:

_GenericAlias[RecordMetadata]

maybe_declare() None[source]
Return type:

None

abstract async declare() None[source]
Return type:

None

abstract prepare_key(key: Optional[Union[bytes, _ModelT, Any]], key_serializer: Optional[Union[CodecT, str]], schema: Optional[_SchemaT] = None) Any[source]
Return type:

Any

abstract prepare_value(value: Union[bytes, _ModelT, Any], value_serializer: Optional[Union[CodecT, str]], schema: Optional[_SchemaT] = None) Any[source]
Return type:

Any

abstract async decode(message: Message, *, propagate: bool = False) _EventT[_T][source]
Return type:

_GenericAlias[~_T]

abstract async deliver(message: Message) None[source]
Return type:

None

abstract async put(value: _EventT[_T]) None[source]
Return type:

None

abstract async get(*, timeout: Optional[Union[timedelta, float, str]] = None) _EventT[_T][source]
Return type:

_GenericAlias[~_T]

abstract empty() bool[source]
Return type:

bool

abstract async on_key_decode_error(exc: Exception, message: Message) None[source]
Return type:

None

abstract async on_value_decode_error(exc: Exception, message: Message) None[source]
Return type:

None

abstract async on_decode_error(exc: Exception, message: Message) None[source]
Return type:

None

abstract on_stop_iteration() None[source]
Return type:

None

abstract async throw(exc: BaseException) None[source]
Return type:

None

abstract derive(**kwargs: Any) ChannelT[source]
Return type:

ChannelT

abstract property subscriber_count: int
Return type:

int

abstract property queue: ThrowableQueue
Return type:

ThrowableQueue