Skip to content

Sp/issue102 #207

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

Open
wants to merge 11 commits into
base: sp/issue102
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,16 @@ to the client web browser when you're looking for a small subset of messages. F

### 5. Define Views

Views are the last step putting all of the pieces together. Views let you configure a Topic to consume from, configure which Message Formats the Topic uses, and optionally apply any Filters.
Views let you configure a Topic to consume from, configure which Message Formats the Topic uses, and optionally apply any Filters.

### 6. Define Producers

Producers let you write messages onto Kafka. With the limitation of one Producer per topic, you add the fully qualified class name of the object that will be represented by the message, and individually add field names that are remembered by the producer for easy message generation.
![Producer Configuration Screenshot](images/webproducer.PNG)

Upon sending a message, the Producer does no data validation and the consumer is responsible for affirming proper object shape.
![Producer Send Message Screenshot](images/webproducer-sendmessage.PNG)


## Writing Custom Deserializers

Expand Down
Binary file added images/webproducer-sendmessage.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/webproducer.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 8 additions & 1 deletion kafka-webview-ui/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>kafka-webview-ui</artifactId>
<version>2.5.0</version>
<version>2.7.1</version>

<!-- Module Description and Ownership -->
<name>Kafka WebView UI</name>
Expand Down Expand Up @@ -259,6 +259,13 @@
<version>0.7</version>
<scope>test</scope>
</dependency>

<!-- For Kafka things-->
<dependency>
<groupId>org.springframework.kafka</groupId>
<artifactId>spring-kafka</artifactId>
</dependency>

</dependencies>

<build>
Expand Down
14 changes: 14 additions & 0 deletions kafka-webview-ui/src/main/frontend/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,20 @@ var ApiClient = {
}
});
},
submitKafkaMessage: function(producerId, messageRequest, callback){
jQuery.ajax({
type: 'POST',
url: ApiClient.buildUrl('api/producer/' + producerId + '/send-message'),
data: messageRequest,
dataType: 'json',
headers: ApiClient.getCsrfHeader(),
success: callback,
error: ApiClient.defaultErrorHandler,
beforeSend: function(xhr) {
xhr.setRequestHeader('Content-type', 'application/json; charset=utf-8');
}
});
},
defaultErrorHandler: function(jqXHR, textStatus, errorThrown) {
// convert response to json
var response = jQuery.parseJSON(jqXHR.responseText);
Expand Down
Loading