Project Setup
First create a Next project with:Javascript (fetch).
Implementation
Paste the producer code to thepages/api/hello.js as below:
This tutorial shows how to use Upstash Kafka with Next.js.
Javascript (fetch).
pages/api/hello.js as below: