Skip to content

Commit

Permalink
Merge branch 'main' into feat/add-kafka-subscriber-concurrent-among-p…
Browse files Browse the repository at this point in the history
…artitions
  • Loading branch information
Lancetnik authored Jan 8, 2025
2 parents e7b31dd + 8e86a8c commit a25bea6
Show file tree
Hide file tree
Showing 27 changed files with 418 additions and 80 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/docs_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- uses: actions/setup-python@v5
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs_update-release-notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Configure Git user
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/pr_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -93,7 +93,7 @@ jobs:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand All @@ -114,7 +114,7 @@ jobs:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand All @@ -135,7 +135,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -176,7 +176,7 @@ jobs:
ALLOW_PLAINTEXT_LISTENER: "true"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -208,7 +208,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -249,7 +249,7 @@ jobs:
ALLOW_PLAINTEXT_LISTENER: "true"
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -281,7 +281,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -311,7 +311,7 @@ jobs:
- 5672:5672
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -343,7 +343,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -373,7 +373,7 @@ jobs:
- 4222:4222
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -405,7 +405,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -435,7 +435,7 @@ jobs:
- 6379:6379
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down Expand Up @@ -475,7 +475,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- uses: actions/setup-python@v5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"
- name: Set up Python
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: astral-sh/setup-uv@v4
- uses: astral-sh/setup-uv@v5
with:
version: "latest"

Expand Down
12 changes: 12 additions & 0 deletions docs/docs/SUMMARY.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,7 @@ search:
- [TelemetrySettingsProvider](public_api/faststream/opentelemetry/TelemetrySettingsProvider.md)
- rabbit
- [ExchangeType](public_api/faststream/rabbit/ExchangeType.md)
- [QueueType](public_api/faststream/rabbit/QueueType.md)
- [RabbitBroker](public_api/faststream/rabbit/RabbitBroker.md)
- [RabbitExchange](public_api/faststream/rabbit/RabbitExchange.md)
- [RabbitPublisher](public_api/faststream/rabbit/RabbitPublisher.md)
Expand Down Expand Up @@ -875,6 +876,7 @@ search:
- [PublishingStatus](api/faststream/prometheus/types/PublishingStatus.md)
- rabbit
- [ExchangeType](api/faststream/rabbit/ExchangeType.md)
- [QueueType](api/faststream/rabbit/QueueType.md)
- [RabbitBroker](api/faststream/rabbit/RabbitBroker.md)
- [RabbitExchange](api/faststream/rabbit/RabbitExchange.md)
- [RabbitPublisher](api/faststream/rabbit/RabbitPublisher.md)
Expand Down Expand Up @@ -935,6 +937,7 @@ search:
- schemas
- [BaseRMQInformation](api/faststream/rabbit/schemas/BaseRMQInformation.md)
- [ExchangeType](api/faststream/rabbit/schemas/ExchangeType.md)
- [QueueType](api/faststream/rabbit/schemas/QueueType.md)
- [RabbitExchange](api/faststream/rabbit/schemas/RabbitExchange.md)
- [RabbitQueue](api/faststream/rabbit/schemas/RabbitQueue.md)
- [ReplyConfig](api/faststream/rabbit/schemas/ReplyConfig.md)
Expand All @@ -945,7 +948,16 @@ search:
- proto
- [BaseRMQInformation](api/faststream/rabbit/schemas/proto/BaseRMQInformation.md)
- queue
- [ClassicQueueArgs](api/faststream/rabbit/schemas/queue/ClassicQueueArgs.md)
- [CommonQueueArgs](api/faststream/rabbit/schemas/queue/CommonQueueArgs.md)
- [QueueClassicTypeSpecificArgs](api/faststream/rabbit/schemas/queue/QueueClassicTypeSpecificArgs.md)
- [QueueQuorumTypeSpecificArgs](api/faststream/rabbit/schemas/queue/QueueQuorumTypeSpecificArgs.md)
- [QueueStreamTypeSpecificArgs](api/faststream/rabbit/schemas/queue/QueueStreamTypeSpecificArgs.md)
- [QueueType](api/faststream/rabbit/schemas/queue/QueueType.md)
- [QuorumQueueArgs](api/faststream/rabbit/schemas/queue/QuorumQueueArgs.md)
- [RabbitQueue](api/faststream/rabbit/schemas/queue/RabbitQueue.md)
- [SharedQueueClassicAndQuorumArgs](api/faststream/rabbit/schemas/queue/SharedQueueClassicAndQuorumArgs.md)
- [StreamQueueArgs](api/faststream/rabbit/schemas/queue/StreamQueueArgs.md)
- reply
- [ReplyConfig](api/faststream/rabbit/schemas/reply/ReplyConfig.md)
- security
Expand Down
11 changes: 11 additions & 0 deletions docs/docs/en/api/faststream/rabbit/QueueType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.QueueType
11 changes: 11 additions & 0 deletions docs/docs/en/api/faststream/rabbit/schemas/QueueType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.QueueType
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.ClassicQueueArgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.CommonQueueArgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.QueueClassicTypeSpecificArgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.QueueQuorumTypeSpecificArgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.QueueStreamTypeSpecificArgs
11 changes: 11 additions & 0 deletions docs/docs/en/api/faststream/rabbit/schemas/queue/QueueType.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.QueueType
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.QuorumQueueArgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.SharedQueueClassicAndQuorumArgs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
# 0.5 - API
# 2 - Release
# 3 - Contributing
# 5 - Template Page
# 10 - Default
search:
boost: 0.5
---

::: faststream.rabbit.schemas.queue.StreamQueueArgs
2 changes: 1 addition & 1 deletion docs/docs/en/getting-started/asgi.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ app = AsgiFastStream(

!!! tip
You do not need to setup all routes using the `asgi_routes=[]` parameter.<br/>
You can use the `#!python app.mount("/healh", asgi_endpoint)` method also.
You can use the `#!python app.mount("/health", asgi_endpoint)` method also.

### AsyncAPI Documentation

Expand Down
2 changes: 1 addition & 1 deletion docs/docs/en/getting-started/publishing/test.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ To test it, you just need to patch your broker with a special *TestBroker*.

{! includes/getting_started/publishing/testing/3.md !}

By default, it patches you broker to run **In-Memory**, so you can use it without any external broker. It should be extremely useful in your CI or local development environment.
By default, it patches your broker to run **In-Memory**, so you can use it without any external broker. It should be extremely useful in your CI or local development environment.

Also, it allows you to check the outgoing message body in the same way as with a [subscriber](../subscription/test.md#validates-input){.internal-link}.

Expand Down
11 changes: 11 additions & 0 deletions docs/docs/en/rabbit/declare.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ search:

# RabbitMQ Queue/Exchange Declaration

## Declaring queues and exchanges

**FastStream** *subscribers* declares and validates all using *RabbitMQ* exchanges and queues (*publishers* declares exchanges only), but sometimes you need to declare them manually.

**RabbitBroker** provides a way to achieve this easily.
Expand All @@ -22,3 +24,12 @@ These methods require just one argument (`RabbitQueue`/`RabbitExchange`) contain

!!! tip
Also, these methods are idempotent, so you can call them with the same arguments multiple times, but the objects will be created once; next time the method will return an already stored object. This way you can get access to any queue/exchange created automatically.


## Binding a queue to an exchange

It is also possible to bind a queue and an exchange using low-level **aio-pika** `RobustQueue.bind` method:

```python linenums="1" hl_lines="24-26 28-30 32-35"
{! docs_src/rabbit/bind.py !}
```
Loading

0 comments on commit a25bea6

Please sign in to comment.