-
Notifications
You must be signed in to change notification settings - Fork 742
(docs) ydb topic consumer add --availability-period #28938
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
d11bdaa
initial
orange13 52dd687
Update ydb/docs/ru/core/reference/ydb-cli/topic-consumer-add.md
orange13 c0721c7
Update ydb/docs/ru/core/reference/ydb-cli/topic-consumer-add.md
orange13 3b9f832
update
ubyte c8ddead
Update topic-consumer-add.md
orange13 2f2eeed
чтение->обработка
ubyte 87e8897
чтение->обработка
ubyte 25ca9c5
reword
ubyte 91cb75e
update link text
ubyte File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 |
|---|---|---|
|
|
@@ -23,14 +23,16 @@ | |
| Имя | Описание | ||
| ---|--- | ||
| `--consumer VAL` | Имя читателя, которого нужно добавить. | ||
| `--starting-message-timestamp VAL` | Время в формате [UNIX timestamp](https://ru.wikipedia.org/wiki/Unix-время). Чтение начнется с первого [сообщения](../../concepts/datamodel/topic.md#message), полученного после указанного времени. Если время не задано, то чтение начнется с самого старого сообщения в топике. | ||
| `--starting-message-timestamp VAL` | Время в формате [UNIX timestamp](https://ru.wikipedia.org/wiki/Unix-время) (секунды с 1970.01.01) или в формате ISO-8601 (например, `2020-07-10T15:00:00Z`). Чтение начнется с первого [сообщения](../../concepts/datamodel/topic.md#message), полученного после указанного времени. Если время не задано, то чтение начнется с самого старого сообщения в топике. | ||
| `--supported-codecs` | Поддерживаемые методы сжатия данных.<br/>Значение по умолчанию — `raw`.<br/>Возможные значения:<ul><li>`RAW` — без сжатия;</li><li>`ZSTD` — сжатие [zstd](https://ru.wikipedia.org/wiki/Zstandard);</li><li>`GZIP` — сжатие [gzip](https://ru.wikipedia.org/wiki/Gzip);</li><li>`LZOP` — сжатие [lzop](https://ru.wikipedia.org/wiki/Lzop).</li></ul> | ||
| `--important` | Указывает, является ли читатель важным.<br/>Значение по умолчанию — `false`.<br/>Для важных читателей:<ul><li>не применяется ограничение по периоду доступности (`--availability-period`);</li><li>данные в топике не удаляются, пока они не прочитаны всеми важными читателями;</li><li>это влияет на процесс очистки данных в топике.</li></ul>Используйте этот параметр для критически важных читателей, которые должны гарантированно прочитать все сообщения. | ||
| `--availability-period VAL` | Период, в течение которого сохраняются незакоммиченные данные в топике.<br/>Формат: положительное число с указанием единицы измерения времени (без пробелов).<br/>Поддерживаются следующие единицы измерения:<ul><li>`s` — секунды (например, `30s`, `120s`);</li><li>`m` — минуты (например, `5m`, `1440m`);</li><li>`h` — часы (например, `1h`, `72h`);</li><li>`d` — дни (например, `1d`, `7d`).</li></ul>Примеры: `72h`, `1440m`, `2d`, `3600s`.<br/>Для важных читателей (с параметром `--important`) этот параметр не применяется. | ||
|
|
||
| ## Примеры {#examples} | ||
|
|
||
| {% include [ydb-cli-profile](../../_includes/ydb-cli-profile.md) %} | ||
|
|
||
| Создайте читателя с именем `my-consumer` для [созданного ранее](topic-create.md) топика `my-topic`, чтение начнется с первого сообщения, полученного после 15 августа 2022 13:00:00 GMT: | ||
| **Создайте читателя с именем `my-consumer` для [созданного ранее](topic-create.md) топика `my-topic`, чтение начнется с первого сообщения, полученного после 15 августа 2022 13:00:00 GMT:** | ||
|
|
||
| ```bash | ||
| {{ ydb-cli }} -p quickstart topic consumer add \ | ||
|
|
@@ -59,3 +61,24 @@ Consumers: | |
| | my-consumer | RAW, GZIP | Mon, 15 Aug 2022 16:00:00 MSK | 0 | | ||
| └──────────────┴─────────────────┴───────────────────────────────┴───────────┘ | ||
| ``` | ||
|
|
||
| **Создайте читателя с именем `backup-consumer` для топика `my-topic` с периодом доступности незакоммиченных данных 3 дня:** | ||
|
||
|
|
||
| ```bash | ||
| {{ ydb-cli }} -p quickstart topic consumer add \ | ||
| --consumer backup-consumer \ | ||
| --availability-period 3d \ | ||
| my-topic | ||
| ``` | ||
|
|
||
| **Создайте важного читателя с именем `critical-consumer` для топика `my-topic` с дополнительной поддержкой кодека `ZSTD`:** | ||
|
|
||
| ```bash | ||
| {{ ydb-cli }} -p quickstart topic consumer add \ | ||
| --consumer critical-consumer \ | ||
| --important \ | ||
| --supported-codecs raw,gzip,zstd \ | ||
| my-topic | ||
| ``` | ||
|
|
||
| Обратите внимание, что для важного читателя параметр `--availability-period` не применяется, даже если он указан. | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ой-ой, что значит эта фраза "Период, в течение которого сохраняются незакоммиченные данные в топике"??? как это незакомиченные сохраняются??