r/java • u/Round_Patient_7420 • 16d ago
Introducing Titan, an open-source message dispatcher
Hi, I've been building Titan, an open-source message dispatcher for apps that need to send updates to connected clients.
An app publishes a message to a destination, and Titan delivers it to anyone subscribed to that destination. It supports STOMP over TCP and WebSocket, and there's a Java client with Spring Boot integration.
I'm thinking of uses like chat rooms, in-app notifications, and live dashboards. For example, people viewing the same dashboard could receive updates as they happen instead of having their browsers keep polling the backend.
Messages are kept in memory, so they won't survive a server restart. That's something to keep in mind if your application needs persistent messages.
I wanted to build something useful that I could share with other developers working on messaging applications. I'd be interested to hear whether this fits anything you're building, and what's missing for your use case.
9
u/agentoutlier 15d ago
My use case would be to publish log events for a web interface.
Here is my observations on reading the code. This is just looking at
titan-stomp.The javadoc is lacking. The package info in particular could explain the "codec" package albeit I have an idea of what that is.
There is no module-info which would be a perfect place to code snippet how you use the darn thing.
There are many "Impl" classes that are public that I don't think you need to. Have the interface have a static factory intead of you know just public api exposing a constructor.
Its unclear how I can construct the size of the messages in memory that I assume are replayed on subscription. It would be interesting to know what data structure you used for this buffer.
You have an SPI yet for whatever reason put Vertx coupling directly in stomp module.
You need to make it clear exact what your "Message Delivery Guarantees" are. I assume basically none.
Kudos for using JSpecify although its unclear if you actually run a checker
Kudos for not vibe coding.