Skip to content

chore(deps): Update dependency faststream to v0.7.1#122

Open
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/faststream-0.x
Open

chore(deps): Update dependency faststream to v0.7.1#122
renovate[bot] wants to merge 1 commit into
mainfrom
renovate/faststream-0.x

Conversation

@renovate

@renovate renovate Bot commented Dec 8, 2025

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
faststream ==0.6.3==0.7.1 age confidence

Release Notes

ag2ai/FastStream (faststream)

v0.7.1

Compare Source

What's Changed

TestBroker.aenter was typed to return Broker | list[Broker]. That union is wrong for both usage shapes: mypy rejects .publish() on the single-broker result (the list arm has no such method) and rejects unpacking the multi-broker result (the Broker arm is not iterable).

# Before — both lines fail under `mypy`:
async with TestKafkaBroker(KafkaBroker()) as br:
    await br.publish(None, "test")
    # error: Item "list[KafkaBroker]" of "KafkaBroker | list[KafkaBroker]" has no attribute "publish"  [union-attr]

async with TestKafkaBroker(KafkaBroker(), KafkaBroker()) as (br1, br2):
    # error: "KafkaBroker" object is not iterable  [misc]
    ...

# After — mypy infers the precise type:
async with TestKafkaBroker(KafkaBroker()) as br:
    reveal_type(br)            # KafkaBroker
    await br.publish(None, "test")

async with TestKafkaBroker(KafkaBroker(), KafkaBroker()) as (br1, br2):
    reveal_type(br1)           # tuple[KafkaBroker, ...] -> KafkaBroker
    await br1.publish(None, "test")
    await br2.publish(None, "test")

Full Changelog: ag2ai/faststream@0.7.0...0.7.1

v0.7.0

Compare Source

What's Changed

🚀 MQTT Support

FastStream now includes a full-featured MQTT broker, installable via pip install faststream[mqtt]. It supports wildcard topic filters, path parameter capture via Path(), QoS levels, per-subscriber ack_policy, and AsyncAPI schema generation.

from faststream import FastStream, Path
from faststream.mqtt import MQTTBroker, MQTTMessage, QoS

broker = MQTTBroker("localhost:1883")
app = FastStream(broker)

@​broker.subscriber(
    "sensors/{device_id}/temperature",
    qos=QoS.AT_LEAST_ONCE,
)
async def on_temperature(body: str, device_id: Annotated[str, Path()]) -> None:
    print(device_id, body)

@​app.after_startup
async def publish_demo() -> None:
    await broker.publish(21.5, "sensors/room1/temperature", qos=QoS.AT_LEAST_ONCE)

🔀 Multi-broker Support

A single FastStream application can now run multiple brokers at the same time. Pass all the brokers directly to the FastStream constructor — each keeps its own subscribers and publishers, and the app starts and stops all of them together. A common use case is bridging two systems: consume from one broker and re-publish to another.

from faststream import FastStream
from faststream.kafka import KafkaBroker
from faststream.nats import NatsBroker

kafka_broker = KafkaBroker("localhost:9092")
nats_broker = NatsBroker("nats://localhost:4222")

app = FastStream(kafka_broker, nats_broker)

@​kafka_broker.subscriber("incoming")
@​nats_broker.publisher("outgoing")
async def from_kafka(msg: str) -> str:
    # Bridge the message from Kafka to NATS
    return msg

@​nats_broker.subscriber("outgoing")
async def from_nats(msg: str) -> None:
    print(f"Received from NATS: {msg}")

🗄️ Redis Cluster Support

FastStream's Redis broker now has a dedicated RedisClusterBroker that connects to a Redis Cluster with automatic node discovery. It is a drop-in replacement for RedisBroker — just change the class name and point it at any cluster node.

from faststream import FastStream
from faststream.redis import RedisClusterBroker

# A single URL is enough — the cluster auto-discovers all remaining nodes
broker = RedisClusterBroker("redis://node1:7000")
app = FastStream(broker)

@​broker.subscriber("events")
async def handle_event(msg: str) -> None:
    print(f"Received: {msg}")

@​app.after_startup
async def publish_event() -> None:
    await broker.publish("hello from cluster", "events")

⚠️ Breaking Changes

AsyncAPIRoute parameter renames (PR #​2894)

The AsyncAPIRoute class (used in ASGI hosting) has had two parameters renamed:

Before After Notes
try_it_out=False try_it_out_path=None Disabling try-it-out now uses None instead of False
try_it_out_url="..." try_it_out_path="..." Parameter renamed for clarity
# Before
AsyncAPIRoute("/docs/asyncapi", try_it_out=False)
AsyncAPIRoute("/docs/asyncapi", try_it_out_url="https://api.example.com/asyncapi/try")

# After
AsyncAPIRoute("/docs/asyncapi", try_it_out_path=None)
AsyncAPIRoute("/docs/asyncapi", try_it_out_path="https://api.example.com/asyncapi/try")

Additionally, a new asyncapi_json_path parameter was added (defaults to <path>.json) and its position in the signature changed — use keyword arguments to avoid surprises.


RabbitMQ: durable=True is now the default (PR #​2892)

RabbitQueue and RabbitExchange now default to durable=True (previously False). This aligns with RabbitMQ 4.3+ which disables transient non-exclusive queues by default.

Impact: if you already have a transient (non-durable) queue or exchange of the same name declared on your broker, re-declaration will raise a PRECONDITION_FAILED mismatch error. To opt out, pass durable=False explicitly:

from faststream.rabbit import RabbitQueue

# To keep the old transient behavior:
queue = RabbitQueue("my-queue", durable=False)

Deprecated items removed

The following APIs that were deprecated in earlier 0.x releases have been fully removed in 0.7.0:

  • Publisher/subscriber-level middlewares — use broker-level or app-level middlewares instead.
  • ack_first, no_ack and related subscriber options — replaced by ack_policy=AckPolicy.*
  • RedisJSONMessageParser — removed. All Redis services must now use the binary message format.
  • broker.close() — removed. Use broker.stop() instead.
Features
Bug Fixes
Documentation
Chore / CI

New Contributors

Full Changelog: ag2ai/faststream@0.6.7...0.7.0

v0.6.7

Compare Source

What's Changed

The main feature of this release is the Try It Out feature for your Async API documentation!

Now you can test your developing application directly from the web, just like Swagger for HTTP. It supports in-memory publication to test a subscriber and real broker publication to verify behavior in real scenarios.

Снимок экрана 2026-03-01 в 11 16 10

Full updates:

New Contributors

Full Changelog: ag2ai/faststream@0.6.6...0.6.7

v0.6.6

Compare Source

What's Changed

New Contributors

Full Changelog: ag2ai/faststream@0.6.5...0.6.6

v0.6.5

Compare Source

What's Changed

New Contributors

Full Changelog: ag2ai/faststream@0.6.4...0.6.5

v0.6.4

Compare Source

What's Changed

New Contributors

Full Changelog: ag2ai/faststream@0.6.3...0.6.4


Configuration

📅 Schedule: (UTC)

  • Branch creation
    • At any time (no schedule defined)
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate Bot added the dependencies label Dec 8, 2025
@renovate renovate Bot force-pushed the renovate/faststream-0.x branch from 5242e71 to 3e521bd Compare December 30, 2025 18:50
@renovate renovate Bot changed the title chore(deps): Update dependency faststream to v0.6.4 chore(deps): Update dependency faststream to v0.6.5 Dec 30, 2025
@renovate renovate Bot force-pushed the renovate/faststream-0.x branch from 3e521bd to f536585 Compare February 4, 2026 20:52
@renovate renovate Bot changed the title chore(deps): Update dependency faststream to v0.6.5 chore(deps): Update dependency faststream to v0.6.6 Feb 4, 2026
@renovate renovate Bot force-pushed the renovate/faststream-0.x branch from f536585 to 42ddbc6 Compare March 2, 2026 09:43
@renovate renovate Bot changed the title chore(deps): Update dependency faststream to v0.6.6 chore(deps): Update dependency faststream to v0.6.7 Mar 2, 2026
@renovate renovate Bot force-pushed the renovate/faststream-0.x branch from 42ddbc6 to de0fd9b Compare April 30, 2026 17:14
@renovate renovate Bot force-pushed the renovate/faststream-0.x branch from de0fd9b to 48985d1 Compare May 12, 2026 12:59
@renovate renovate Bot force-pushed the renovate/faststream-0.x branch from 48985d1 to bba5c40 Compare June 2, 2026 21:29
@renovate renovate Bot changed the title chore(deps): Update dependency faststream to v0.6.7 chore(deps): Update dependency faststream to v0.7.0 Jun 2, 2026
@renovate renovate Bot force-pushed the renovate/faststream-0.x branch from bba5c40 to 221e185 Compare June 5, 2026 06:42
@renovate renovate Bot changed the title chore(deps): Update dependency faststream to v0.7.0 chore(deps): Update dependency faststream to v0.7.1 Jun 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants