socket.io-kafkajs
v3.0.2
Published
The kafkajs adapter for socket.io
Downloads
37
Readme
socket.io-kafkajs
Install
npm i socket.io-kafkajs
Use Adapter
import http from "http";
import { Server } from "socket.io";
import { createAdapter } from "socket.io-kafkajs";
const httpServer = http.createServer(app);
const io = new Server(httpServer);
const adapter = createAdapter({
brokers: "localhost:9092",
clientId: "SocketIO",
groupId: "SocketIO",
topic: "SocketIO",
});
io.adapter(adapter);
Option Config
Read package kafkajs
Support version
socket.io-kafkajs 2.x -- support -- socket.io 2.x
socket.io-kafkajs 3.x -- support -- socket.io 3.x