Skip to content
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

Provide an option to clear the consumer view #105

Merged
merged 1 commit into from
Feb 5, 2021

Conversation

angelozerr
Copy link
Collaborator

Provide an option to clear the consumer view

Fixes #40

Signed-off-by: azerr [email protected]

@angelozerr angelozerr requested a review from fbricon February 2, 2021 21:10
@angelozerr angelozerr force-pushed the clear-consumer branch 2 times, most recently from 864b86c to 91753c4 Compare February 3, 2021 17:44
CHANGELOG.md Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/commands/consumers.ts Outdated Show resolved Hide resolved
@angelozerr
Copy link
Collaborator Author

This PR adds Clear Consumer command, see the following demo:

ClearConsumerDemo2

@angelozerr angelozerr force-pushed the clear-consumer branch 2 times, most recently from 8e14690 to f7faed8 Compare February 4, 2021 17:48
@angelozerr
Copy link
Collaborator Author

I have updated the documentation.

@angelozerr angelozerr force-pushed the clear-consumer branch 3 times, most recently from 733c034 to 7724101 Compare February 4, 2021 18:14
Consuming topics can be done by right clicking a topic in the explorer or from the command palette. Some things to note about consuming:
Consuming topics can be done:

* with [Kafka Explorer](#kafka-explorer) by right clicking a topic in the explorer.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the [Kafka Explorer](#kafka-explorer), by right-clicking on a topic and selecting "Start Consumer".

Consuming topics can be done:

* with [Kafka Explorer](#kafka-explorer) by right clicking a topic in the explorer.
* with the [Start command](#start-command) from the command palette.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

from the [Start command](#start-command), from the command palette.


### Kafka explorer

You can start consumer with [Kafka Explorer](Explorer.md#explorer) by right clicking a topic in the explorer:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can start consuming messages from the [Kafka Explorer](Explorer.md#explorer), by right-clicking on a topic:


![Start Consumer with Explorer](assets/start-consumer-from-explorer.png)

Once this command is executed, it creates a consumer group (with generated id) and opens the [Consumer View](#consumer-view) where you can see the producing messages:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once this command is launched, it creates a consumer group (with an auto-generated id), and opens the [Consumer View](#consumer-view) where you can see the messages being consumed:


![Consumer group / Consumer View](assets/consumer-group-after-starting-from-explorer.png)

In this case, you cannot configure offset, partition and consumer group id. The offset can be just configured with the [kafka.consumers.offset](#kafkaconsumersoffset) preference.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case, the starting offset can be only be configured via the [kafka.consumers.offset](#kafkaconsumersoffset) preference.


In this case, you cannot configure offset, partition and consumer group id. The offset can be just configured with the [kafka.consumers.offset](#kafkaconsumersoffset) preference.

Some things to note about consuming:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Known limitations:


## Consumer View

`Consumer View` is a read-only editor which shows producing messages for a given topic:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Consumer View is a read-only editor which shows consumed messages for a given topic:


![Consumer view](assets/consumer-view.png)

This editor provides 2 commands on the right of the editor:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... on the top right of the editor:


This editor provides 2 commands on the right of the editor:

* `Clear Consumer View` to clear the content of the view.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clear Consumer View: clears the view.

This editor provides 2 commands on the right of the editor:

* `Clear Consumer View` to clear the content of the view.
* `Start/Stop` to stop or restart the consumer.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start/Stop: to stop or (re)start the consumer.


* 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).

### Start command
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start Consumer command

Consuming topics can be done:

* from the [Kafka Explorer](#kafka-explorer), by right-clicking on a topic and selecting "Start Consumer".
* from the [Start command](#start-command), from the command palette.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Start Consumer](#start-consumer-command) command


* 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).

### Start command

![Start Consumer with palette](assets/start-consumer-from-command.png)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Start Consumer from command palette

@fbricon fbricon merged commit 9041cfe into jlandersen:master Feb 5, 2021
@fbricon
Copy link
Collaborator

fbricon commented Feb 5, 2021

Thanks @angelozerr!

@angelozerr
Copy link
Collaborator Author

Thanks @fbricon for the review!

@angelozerr angelozerr deleted the clear-consumer branch February 5, 2021 14:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide an option to clear the consumer view
2 participants