apisix icon indicating copy to clipboard operation
apisix copied to clipboard

help request: Apisix KafKa Integration

Open senolatac opened this issue 1 year ago • 4 comments

Description

I saw there is kafka plugin in Apisix and there is a documentation https://apisix.apache.org/docs/apisix/next/pubsub/kafka/ but I couldn't understand how I use the apisix route after creation. I though it is a broker url but it is not.

Any suggestion?

Environment

  • APISIX version (run apisix version): 3.2.0
  • Operating system (run uname -a):
  • OpenResty / Nginx version (run openresty -V or nginx -V):
  • etcd version, if relevant (run curl http://127.0.0.1:9090/v1/server_info):
  • APISIX Dashboard version, if relevant:
  • Plugin runner version, for issues related to plugin runners:
  • LuaRocks version, for installation issues (run luarocks --version):

senolatac avatar Feb 07 '24 10:02 senolatac

I though it is a broker url but it is not.

what is a broker URL? Please be specific about your issues.

shreemaan-abhishek avatar Feb 08 '24 16:02 shreemaan-abhishek

The kafka-logger: https://docs.api7.ai/hub/kafka-logger plugin is used to log entries to kafka and the pubsub documentation link you shared is for proxying kafka.

shreemaan-abhishek avatar Feb 08 '24 16:02 shreemaan-abhishek

Similar inquiry: https://github.com/apache/apisix/issues/10421

kayx23 avatar Feb 24 '24 06:02 kayx23

Disclaimer: I'm no expert on this topic, but here are some information I gathered.

The test case (https://github.com/apache/apisix/blob/master/t/pubsub/kafka.t#L156) suggests that one should pull messages from kafka over websocket connections and with messages binary-encoded.

Only list_offset and fetch commands are supported at the moment. list_offset is used to check the message offset at the specified timestamp on the current topic. fetch is used to obtain the message from a specific offset.

kayx23 avatar Feb 26 '24 22:02 kayx23