diff --git a/.secrets.baseline b/.secrets.baseline index 047a7df974..f396e694ed 100644 --- a/.secrets.baseline +++ b/.secrets.baseline @@ -153,7 +153,7 @@ "filename": "docs/docs/en/release.md", "hashed_secret": "35675e68f4b5af7b995d9205ad0fc43842f16450", "is_verified": false, - "line_number": 1850, + "line_number": 1898, "is_secret": false } ], @@ -178,5 +178,5 @@ } ] }, - "generated_at": "2024-11-15T07:38:53Z" + "generated_at": "2024-12-01T18:17:03Z" } diff --git a/docs/docs_src/nats/js/main.py b/docs/docs_src/nats/js/main.py index a65749b082..715e04fd4b 100644 --- a/docs/docs_src/nats/js/main.py +++ b/docs/docs_src/nats/js/main.py @@ -1,5 +1,6 @@ from faststream import FastStream, Logger from faststream.nats import JStream, NatsBroker +from nats.js.api import DeliverPolicy broker = NatsBroker() app = FastStream(broker) @@ -9,7 +10,7 @@ @broker.subscriber( "js-subject", stream=stream, - deliver_policy="new", + deliver_policy=DeliverPolicy.NEW, ) async def handler(msg: str, logger: Logger): logger.info(msg)