forked from jlandersen/vscode-kafka
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes jlandersen#35 Signed-off-by: azerr <[email protected]>
- Loading branch information
1 parent
87fe68d
commit aa33f82
Showing
11 changed files
with
1,032 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Consuming | ||
|
||
Consuming topics can be done by right clicking a topic in the explorer or from the command palette. Some things to note about consuming: | ||
|
||
* UTF-8 encoded keys and values only. If data is encoded differently, it will not be pretty. | ||
* One consumer group is created per topic (may change in the future to just have one for the extension). | ||
|
||
Consumers are based on virtual documents, available in the VS Code extension API. A consumer will keep running even if you close the document in the editor. You should make sure to close the consumer explicitly, either via the command palette, the status bar element or the start/stop action button as well. The VS Code API does not support detecting if a virtual document is closed immediately. Instead, the underlying virtual document is automatically closed after two minutes if the document is closed in the editor. | ||
|
||
You can configure start offset for new consumers in settings (earliest, latest). |
Empty file.
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,25 @@ | ||
# Producing | ||
|
||
Producing can be done by creating a `.kafka` file. Write simple producers using the following format: | ||
|
||
```json | ||
PRODUCER keyed-message | ||
topic: my-topic | ||
key: mykeyq | ||
record content | ||
|
||
### | ||
|
||
PRODUCER non-keyed-json-message | ||
topic: json-events | ||
{ | ||
"type": "my_test_event" | ||
} | ||
``` | ||
|
||
For actually producing a single record, click on the "Produce record" link above the PRODUCER line; for producing 10 records, click on "Produce record x 10". | ||
The log about produced messages is printed in the "Kafka Producer Log" Output view. | ||
|
||
Record content can be randomized by injecting mustache-like placeholders of [faker.js properties](https://github.com/Marak/faker.js#api-methods), like ``{{name.lastName}}`` or ``{{random.number}}``. Some randomized properties can be localized via the `kafka.producers.fakerjs.locale` setting. | ||
|
||
![Screenshot-4](assets/screen-4.png) |
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,7 @@ | ||
# VSCode Kafka Documentation | ||
|
||
Welcome to the [vscode-kafka](https://github.com/jlandersen/vscode-kafka) documentation. | ||
|
||
* [Kafka Explorer](Explorer.md#explorer) | ||
* [Producing](Producing.md#producing) | ||
* [Consuming](Consuming.md#consuming) |
Oops, something went wrong.