Technical Report 002 · Konnect
Designing a Message-Driven System
Six services, one conversation, and why none of them call each other.
Issue 01 · September 2025 · Filed under: Messaging · Microservices
§1 Publish what happened
Konnect's services never reach into one another. A service does its work, then publishes an event; whoever cares subscribes. The chat path stays fast because no step waits on a slower neighbour.
§2 Two brokers, two jobs
RabbitMQ handles work that should happen once — deliver this, notify that — with acknowledgements and routing keys. Kafka carries the chat stream itself: ordered within a partition, retained, and readable by offset, so the moderation pipeline can be replayed.
§3 Moderation as a consumer
Chat events flow through topic-based consumers into RoBERTa and Toxic-BERT behind a Flask inference server. A single message is rarely enough evidence, so Redis aggregates flags over a sliding window and the system judges a pattern, not a line.
§4 What it costs
Decoupling moves complexity into ordering, idempotency and replay. Each consumer has to tolerate seeing an event twice, and each topic has to be designed around what must stay in order.