Normally, deploying a custom plugin requires uploading Lua files to every data plane and restarting Kong Gateway. With streaming plugins, you define the plugin schema and handler directly in your Kong Gateway entity configuration. The control plane becomes the single source of truth and distributes the plugin to all connected data planes automatically, with no file management or restarts needed.
In this guide, you’ll define two plugins inline to demonstrate how streaming works:
-
replaceme: Substitutes a target word in the request body with a replacement word before forwarding to the upstream. -
reflector: Returns the request body directly to the caller, bypassing the upstream. This lets you inspect the modified body without needing an external service.
You’ll apply replaceme globally with a condition so it only runs when the request path does not contain the word skip, then validate both cases.