-
Notifications
You must be signed in to change notification settings - Fork 176
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add BatchBufferOverflowException (#1990)
* feat: add BatchBufferOverflowException * docs: generate API References * fix: use pre-commit * Update producer.py * chore: fix CI * chore: fix CI --------- Co-authored-by: spataphore1337 <spataphore1337@users.noreply.github.com> Co-authored-by: Pastukhov Nikita <nikita@pastukhov-dev.ru> Co-authored-by: Nikita Pastukhov <diementros@yandex.ru>
- Loading branch information
1 parent
001aedd
commit 684ef1a
Showing
7 changed files
with
57 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
docs/docs/en/api/faststream/kafka/exceptions/BatchBufferOverflowException.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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.kafka.exceptions.BatchBufferOverflowException |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
./api/ | ||
api |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
from faststream.exceptions import FastStreamException | ||
|
||
|
||
class BatchBufferOverflowException(FastStreamException): | ||
"""Exception raised when a buffer overflow occurs when adding a new message to the batches.""" | ||
|
||
def __init__(self, message_position: int) -> None: | ||
self.message_position = message_position | ||
|
||
def __str__(self) -> str: | ||
return ( | ||
f"The batch buffer is full. The position of the message" | ||
f" in the transferred collection at which the overflow occurred: {self.message_position}" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters