Skip to content

Commit

Permalink
add default for queue type
Browse files Browse the repository at this point in the history
  • Loading branch information
pepellsd committed Dec 21, 2024
1 parent 535ada5 commit 67b448f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions faststream/rabbit/broker/broker.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
RABBIT_REPLY,
RabbitExchange,
RabbitQueue,
RabbitQueueType,
)
from faststream.rabbit.security import parse_security
from faststream.rabbit.subscriber.asyncapi import AsyncAPISubscriber
Expand Down Expand Up @@ -476,7 +475,7 @@ async def _connect( # type: ignore[override]
if max_consumers:
c = AsyncAPISubscriber.build_log_context(
None,
RabbitQueue("", queue_type=RabbitQueueType.Classic),
RabbitQueue(""),
RabbitExchange(""),
)
self._log(f"Set max consumers to {max_consumers}", extra=c)
Expand Down
4 changes: 1 addition & 3 deletions faststream/rabbit/schemas/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,4 @@
"ReplyConfig",
)

RABBIT_REPLY = RabbitQueue(
"amq.rabbitmq.reply-to", passive=True, queue_type=RabbitQueueType.Classic
)
RABBIT_REPLY = RabbitQueue("amq.rabbitmq.reply-to", passive=True)
2 changes: 1 addition & 1 deletion faststream/rabbit/schemas/queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def routing(self) -> str:
def __init__(
self,
name: str,
queue_type: Literal[RabbitQueueType.Classic],
queue_type: Literal[RabbitQueueType.Classic] = RabbitQueueType.Classic,
durable: Literal[True, False] = False,
exclusive: bool = False,
passive: bool = False,
Expand Down

0 comments on commit 67b448f

Please sign in to comment.