You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2022/05/17 08:07:59 UTC

[GitHub] [apisix] bzp2010 commented on a diff in pull request #7059: docs: add pubsub develop example for kafka

bzp2010 commented on code in PR #7059:
URL: https://github.com/apache/apisix/pull/7059#discussion_r874502513


##########
docs/en/latest/pubsub.md:
##########
@@ -58,6 +58,192 @@ Apache APISIX implement an extensible pubsub module, which is responsible for st
 - Implement the required message system instruction processing functions
 - Optional: Create plugins to support advanced configurations of this messaging system
 
-### Example
+### Example of Apache Kafka
 
-TODO, an example will be added later to point out how to support other messaging systems.
+#### Add new commands and response body definitions to `pubsub.proto`
+
+The core of the protocol definition in `pubsub.proto` is the two parts `PubSubReq` and `PubSubResp`.
+
+First, create the `CmdKafkaFetch` command and add the required parameters. Then, register this command in the list of commands for `req` in `PubSubReq`, which is named `cmd_kafka_fetch`.
+
+```protobuf
+message CmdKafkaFetch {
+    string topic = 1;
+    int32 partition = 2;
+    int64 offset = 3;
+}
+
+message PubSubReq {
+    int64 sequence = 1;
+    oneof req {
+        CmdKafkaFetch cmd_kafka_fetch = 31;

Review Comment:
   updated to source file link



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@apisix.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org