Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/faststream-stomp/faststream_stomp/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import anyio
import stompman
from fast_depends.dependencies import Dependant
from faststream import ContextRepo, PublishType
from faststream import BaseMiddleware, ContextRepo, PublishType
from faststream._internal.basic_types import LoggerProto, SendableMessage
from faststream._internal.broker import BrokerUsecase
from faststream._internal.broker.registrator import Registrator
Expand Down Expand Up @@ -47,7 +47,8 @@ def _handle_listen_task_done(listen_task: asyncio.Task[None]) -> None:
except asyncio.CancelledError:
return
if isinstance(task_exception, ExceptionGroup) and isinstance(
task_exception.exceptions[0], stompman.FailedAllConnectAttemptsError
task_exception.exceptions[0],
stompman.FailedAllConnectAttemptsError,
):
raise SystemExit(1)

Expand Down Expand Up @@ -94,7 +95,7 @@ def __init__(
decoder: CustomCallable | None = None,
parser: CustomCallable | None = None,
dependencies: Iterable[Dependant] = (),
middlewares: Sequence[BrokerMiddleware[stompman.MessageFrame, StompPublishCommand]] = (),
middlewares: Sequence[type[BaseMiddleware] | BrokerMiddleware[stompman.MessageFrame, StompPublishCommand]] = (),
graceful_timeout: float | None = 15.0,
routers: Sequence[Registrator[stompman.MessageFrame]] = (),
# Logging args
Expand Down
Loading