faust.app.router
¶
Route messages to Faust nodes by partitioning.
- class faust.app.router.Router(app: AppT)[source]¶
Router for
app.router
.- key_store(table_name: str, key: Optional[Union[bytes, _ModelT, Any]]) URL [source]¶
Return the URL of web server that hosts key in table.
- Return type:
- external_topic_key_store(topic: TopicT, key: Optional[Union[bytes, _ModelT, Any]]) URL [source]¶
Return the URL of web server that processes the key in a topics.
- Return type:
- table_metadata(table_name: str) MutableMapping[str, MutableMapping[str, List[int]]] [source]¶
Return metadata stored for table in the partition assignor.
- tables_metadata() MutableMapping[str, MutableMapping[str, List[int]]] [source]¶
Return metadata stored for all tables in the partition assignor.
- external_topics_metadata() MutableMapping[str, MutableMapping[str, List[int]]] [source]¶
Return metadata stored for all external topics in the partition assignor.
- async route_req(table_name: str, key: Optional[Union[bytes, _ModelT, Any]], web: Web, request: Request) Response [source]¶
Route request to worker having key in table.