A Б
Причина в жизненном цикле: провайдер открывает брокер, но asyncio.run(create_app()) закрывает свой event loop до запуска Uvicorn. При закрытии loop соединение брокера закрывается. Обработчик получает этот же брокер и вызывает publish() уже без соединения.
То есть дело не в самом размещении брокера в провайдере, а в том, что его открывают при создании приложения в отдельном asyncio.run()
AlexА сейчас что ему надо?
https://dpaste.com/ALAP8A2XW
В сетапе публикует, а если зайти на / то бросает
File "/usr/local/lib/python3.14/site-packages/faststream/rabbit/helpers/declarer.py", line 117, in declare_exchange
channel_obj = await self.__channel_manager.get_channel(channel)
ахуеть, я исходники не видел
🎉 New Pull Request to ag2ai/faststream by @benedikt-bartscher
✨ fix(rabbit): cancel the consumer before waiting for in-flight handlers on stop (#3298)
📊 +101/-7
🌿 benedikt-bartscher:fix/rabbit-cancel-consumer-before-graceful-wait → main
DESCRIPTION
RabbitSubscriber.stop() cancelled the consumer only after graceful_timeout, so RabbitMQ kept delivering up to the prefetch count to the stopping subscriber, which ignored those messages and left them unacknowledged until the channel closed; it now cancels the consumer before waiting for in-flight handlers and requeues anything that still arrives meanwhile, so these messages go to the queue's other consumers right away, as the graceful shutdown docs describe ("Every subscriber stops consuming new messages").
Type of change
☑️ Bug fix (a non-breaking change that resolves an issue)
Checklist
☑️ My code adheres to the style guidelines of this project (just lint shows no errors)
☑️ I have conducted a self-review of my own code
☑️ My changes do not generate any new warnings
☑️ I have added tests to validate the effectiveness of my fix or the functionality of my new feature
sent via relator
🎉 New Pull Request to ag2ai/faststream by @vlbaluk
✨ docs: add Wordfully to adopters (#3299)
📊 +1/-0
🌿 vlbaluk:docs/add-wordfully-batch-2 → main
DESCRIPTION
Adds Wordfully to the organization-confirmed adopter table. Optional deployment fields are left empty. No related issue.
Type of change
☑️ Documentation
Validation
Checked the six-column table, company link, duplicate absence, and changed-file scope. Application tests and static analysis were not run for this listing-only change.
Checklist
☑️ I have conducted a self-review of the change
☑️ I have made the necessary changes to the documentation
◻️ just lint, just test-coverage, and just static-analysis were not run for this adopter-list edit
Tests and code examples: not applicable; no behavior changed
sent via relator
🎉 New Pull Request to faststream-community/dishka-faststream by @dependabot[bot]
✨ chore(deps): bump the github-actions group across 1 directory with 6 updates (#64)
📊 +9/-9
🌿 faststream-community:dependabot/github_actions/github-actions-0236d778bf → main
#dependencies #github_actions
sent via relator