from .base import BaseBackend
from kombu import Queue
from typing import Any, Optional

class BacklogLimitExceeded(Exception): ...

class NoCacheQueue(Queue):
    can_cache_declaration: bool = ...

class AMQPBackend(BaseBackend):
    Exchange: Any = ...
    Queue: Any = ...
    Consumer: Any = ...
    Producer: Any = ...
    BacklogLimitExceeded: Any = ...
    persistent: bool = ...
    supports_autoexpire: bool = ...
    supports_native_join: bool = ...
    retry_policy: Any = ...
    delivery_mode: Any = ...
    exchange: Any = ...
    serializer: Any = ...
    auto_delete: Any = ...
    def __init__(self, app: Any, connection: Optional[Any] = ..., exchange: Optional[Any] = ..., exchange_type: Optional[Any] = ..., persistent: Optional[Any] = ..., serializer: Optional[Any] = ..., auto_delete: bool = ..., **kwargs: Any) -> None: ...
    def revive(self, channel: Any) -> None: ...
    def rkey(self, task_id: Any): ...
    def destination_for(self, task_id: Any, request: Any): ...
    def store_result(self, task_id: Any, result: Any, state: Any, traceback: Optional[Any] = ..., request: Optional[Any] = ..., **kwargs: Any) -> None: ...
    def on_reply_declare(self, task_id: Any): ...
    def wait_for(self, task_id: Any, timeout: Optional[Any] = ..., cache: bool = ..., no_ack: bool = ..., on_interval: Optional[Any] = ..., READY_STATES: Any = ..., PROPAGATE_STATES: Any = ..., **kwargs: Any): ...
    def get_task_meta(self, task_id: Any, backlog_limit: int = ...): ...
    poll: Any = ...
    def drain_events(self, connection: Any, consumer: Any, timeout: Optional[Any] = ..., on_interval: Optional[Any] = ..., now: Any = ..., wait: Optional[Any] = ...): ...
    def consume(self, task_id: Any, timeout: Optional[Any] = ..., no_ack: bool = ..., on_interval: Optional[Any] = ...): ...
    def get_many(self, task_ids: Any, timeout: Optional[Any] = ..., no_ack: bool = ..., on_message: Optional[Any] = ..., on_interval: Optional[Any] = ..., now: Any = ..., getfields: Any = ..., READY_STATES: Any = ..., PROPAGATE_STATES: Any = ..., **kwargs: Any) -> None: ...
    def reload_task_result(self, task_id: Any) -> None: ...
    def reload_group_result(self, task_id: Any) -> None: ...
    def save_group(self, group_id: Any, result: Any) -> None: ...
    def restore_group(self, group_id: Any, cache: bool = ...) -> None: ...
    def delete_group(self, group_id: Any) -> None: ...
    def __reduce__(self, args: Any = ..., kwargs: Optional[Any] = ...): ...
    def as_uri(self, include_password: bool = ...): ...
