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

Support for sending and receiving messages to and from Kafka in Wasm plugins #1604

Open
johnlanni opened this issue Dec 19, 2024 · 0 comments
Labels

Comments

@johnlanni
Copy link
Collaborator

Why do you need it?

While gateways are primarily used in synchronous scenarios, there are also some use cases for asynchronous scenarios, such as:

  1. The business itself is asynchronous, and after receiving an HTTP request, it needs to be first placed into a message queue, then consumed by a specific service.
  2. In SSE (Server-Sent Events) scenarios, the gateway acts as a consumer, waiting for message queue messages to be pushed, and then pushing them to the client.
  3. Websocket scenarios, which are similar to the above.

How to implement?

  1. Implement a Kafka client in the Envoy wasm context, along with readMessage and writeMessage interfaces. You can refer to the redis client and the logic of the Envoy kafka broker filter.
  2. Extend the host ABI interface and corresponding logic in proxy-wasm-cpp-host
  3. Extend the module abi interface and corresponding logic in wasm-go/wasm-cpp/wasm-rust
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Todo
Development

No branches or pull requests

1 participant