Hello,

I'm playing around kafka for building a chat application. Here is what I
have done so far:

1. I have set up a CDC (change data capture) on my Postgresql database
2. The change on my table will get published to Kafka
3. I have node socket.io server, which listen to these messages on kafka
and sends back to connected clients via websockets
4. Have a simple UI to see all messages flowing through kafka topic
(updates will happen real time via web sockets).

Now comes the interesting question:

1. If there is a one on one chat happens, how to design the topic? Do we
need to create topic for each chat (I guess atleast from my knowledge, it
won't scale well).
2. If there is a group chat, then those topics should be separate as well?
3. Or have a common topic and see the change payload from my database and
identify the connected client and send update on need basis?

Or is there any standard pattern in Kafka community to solve this
particular problem. Am I missing something here?

Thanks much on your time on this.

Thanks,
Anto.

Reply via email to