from celery import bootsteps
from typing import Any, Optional

def dump_body(m: Any, body: Any): ...

class Consumer:
    Strategies: Any = ...
    init_callback: Any = ...
    pool: Any = ...
    timer: Any = ...
    restart_count: int = ...
    class Blueprint(bootsteps.Blueprint):
        name: str = ...
        default_steps: Any = ...
        def shutdown(self, parent: Any) -> None: ...
    app: Any = ...
    controller: Any = ...
    hostname: Any = ...
    pid: Any = ...
    strategies: Any = ...
    conninfo: Any = ...
    connection_errors: Any = ...
    channel_errors: Any = ...
    on_task_request: Any = ...
    on_task_message: Any = ...
    amqheartbeat_rate: Any = ...
    disable_rate_limits: Any = ...
    initial_prefetch_count: Any = ...
    prefetch_multiplier: Any = ...
    task_buckets: Any = ...
    hub: Any = ...
    amqheartbeat: Any = ...
    loop: Any = ...
    steps: Any = ...
    blueprint: Any = ...
    def __init__(self, on_task_request: Any, init_callback: Any = ..., hostname: Optional[Any] = ..., pool: Optional[Any] = ..., app: Optional[Any] = ..., timer: Optional[Any] = ..., controller: Optional[Any] = ..., hub: Optional[Any] = ..., amqheartbeat: Optional[Any] = ..., worker_options: Optional[Any] = ..., disable_rate_limits: bool = ..., initial_prefetch_count: int = ..., prefetch_multiplier: int = ..., **kwargs: Any) -> None: ...
    def call_soon(self, p: Any, *args: Any, **kwargs: Any): ...
    def perform_pending_operations(self) -> None: ...
    def bucket_for_task(self, type: Any): ...
    def reset_rate_limits(self) -> None: ...
    def start(self) -> None: ...
    def on_connection_error_before_connected(self, exc: Any) -> None: ...
    def on_connection_error_after_connected(self, exc: Any) -> None: ...
    def register_with_event_loop(self, hub: Any) -> None: ...
    def shutdown(self) -> None: ...
    def stop(self) -> None: ...
    def on_ready(self) -> None: ...
    def loop_args(self): ...
    def on_decode_error(self, message: Any, exc: Any) -> None: ...
    def on_close(self) -> None: ...
    def connect(self): ...
    def connection_for_read(self, heartbeat: Optional[Any] = ...): ...
    def connection_for_write(self, heartbeat: Optional[Any] = ...): ...
    def ensure_connected(self, conn: Any): ...
    def on_send_event_buffered(self) -> None: ...
    def add_task_queue(self, queue: Any, exchange: Optional[Any] = ..., exchange_type: Optional[Any] = ..., routing_key: Optional[Any] = ..., **options: Any) -> None: ...
    def cancel_task_queue(self, queue: Any) -> None: ...
    def apply_eta_task(self, task: Any) -> None: ...
    def on_unknown_message(self, body: Any, message: Any) -> None: ...
    def on_unknown_task(self, body: Any, message: Any, exc: Any) -> None: ...
    def on_invalid_task(self, body: Any, message: Any, exc: Any) -> None: ...
    def update_strategies(self) -> None: ...
    def create_task_handler(self, promise: Any = ...): ...

class Evloop(bootsteps.StartStopStep):
    label: str = ...
    last: bool = ...
    def start(self, c: Any) -> None: ...
    def patch_all(self, c: Any) -> None: ...
